eg start 4 tasks, of unknown execution time:
and then later, see which ones had any luck:
B4X:
Dim rs(4) as ResumableSub
rs(0) = GiveItAGo(1000)
rs(1) = GiveItAGo(1001)
rs(2) = GiveItAGo(1002)
rs(3) = GiveItAGo(1003)
and then later, see which ones had any luck:
B4X:
For I = 0 to 4 - 1
If rs(I).Completed Then
Log( how to get return value of rs(I) )
End If
Next