If there are a set of concurrent tasks scheduled, how to wait for the first task to complete?.
Does exists something like wait([t1, t2], return_when=:FIRST_COMPLETED)?
function task1()
rt = rand()
@info "task1 time: $rt"
sleep(rt)
@info "task 1 done"
end
function task2()
rt = rand()
@info "task2 time: $rt"
sleep(rt)
@info "task 2 done"
end
t1 = @async task1()
t2 = @async task2()
# wait for just the first completed task
# ???