Constantino Schillebeeckx
03/10/2022, 3:29 PM@task
def sleep_5():
print(f'sleeping 5')
time.sleep(5)
print(f'done sleeping 5')
@task
def sleep_x(x):
print(f'sleeping {x}')
time.sleep(x)
print(f'done sleeping {x}')
with DHFlow("foo") as flow:
sleep_5()
sleep_x.map([7, 8])
when I execute the above, sleep_5
is run first; only after it finishes will sleep_x
run.Kevin Kho
03/10/2022, 3:29 PMConstantino Schillebeeckx
03/10/2022, 3:32 PM