thousands-car-79657
11/16/2023, 9:39 PMresults = []
for i in range(10):
results.append(some_task(i))
Is there way to make the task at i=1
wait for the task at i=0
to finish? And I’d like it to work locally as well as remotely.calm-pilot-2010
11/16/2023, 10:04 PMresults = []
for i in range(10):
some_task_result = some_task(i)
if len(results) > 0:
results[-1] >> some_task_result
results.append(some_task_result)
I've done something similar to this before but I have not actually tested this code.flaky-daybreak-42119
11/16/2023, 10:05 PMthousands-car-79657
11/16/2023, 10:21 PMthousands-car-79657
11/17/2023, 1:06 AM