Thread
#prefect-community
    a

    Adisun Wheelock

    2 years ago
    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?
    Laura Lorenz (she/her)

    Laura Lorenz (she/her)

    2 years ago
    Hi! Yes, the executor is what is going to determine whether you get parallelism from non-dependent tasks or not.
    Dylan

    Dylan

    2 years ago
    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

    Adisun Wheelock

    2 years ago
    okay, thank you both!
    Dylan

    Dylan

    2 years ago
    But we guarantee that
    first_condition
    and
    second_condition
    will complete before
    next_task
    starts
    Laura Lorenz (she/her)

    Laura Lorenz (she/her)

    2 years ago
    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 🙂