I have several Parallel.For operations in a row.
I am currently studying each Parallel.For the return value ParallelLoopResultand sleep for 20 milliseconds until the member IsCompletedis set to true.
Dim plr as ParallelLoopResult
plr = Parallel.For(...)
while not plr.IsCompleted
Thread.Sleep(20)
end while
plr = Parallel.For(...)
while not plr.IsCompleted
Thread.Sleep(20)
end while
.
.
.
How can I add a kernel level block (i.e. WaitHandle) instead of a loop and Thread.Sleep? Is there a completion event that fires Parallel.For? Parallel. To provide such a mechanism?
source
share