I have a question abow flow control. If I have a f...
# prefect-community
a
I have a question abow flow control. If I have a flow that looks like this and run the flow with
DaskExecutor
, it will run
first_condition
and
second_condition
asynchronously correct? And if I use
LocalExecutor
, it will run
first_condition
and then
second condition
synchronously?
l
Hi! Yes, the executor is what is going to determine whether you get parallelism from non-dependent tasks or not.
d
Hey @Adisun Wheelock! If you run the above flow with the
DaskExecutor
on a Dask cluser with sufficient workers or threads to execute tasks simultaneously, then that’s correct. For the local executor, I’m not sure we make guarantees about which condition will run first in sequence.
a
okay, thank you both!
d
But we guarantee that
first_condition
and
second_condition
will complete before
next_task
starts
l
Yeah, it so happens that they will likely execute in the same order based on the way we walk the dependency graph and since python 3.6+ introduced stable ordering in dictionaries, but we don’t necessarily guarantee that in the future 🙂