I'm using IOmniParallelJoin
to compute the several tasks in parallel with NoWait
function because I want the GUI to stay responsive. But I also need to know when the computation is finished. Is there any event which is triggered in such case?
Asked
Active
Viewed 97 times
0

Yuriy Chachora
- 739
- 6
- 18
1 Answers
2
You can either use the OnStop
function to inject some code or use a Task Configuration via TaskConfig
and assign the code via OnTerminated
. The difference is that OnStop
is called inside one of the worker threads while OnTerminated
is called inside the main thread.

Uwe Raabe
- 45,288
- 3
- 82
- 130
-
One more difference which I noticed is that OnTerminated event will be called as many times as there are threads (tasks) "join" have. How to deal with the situation when it is required to run the code in the main thread only once? – Yuriy Chachora Nov 09 '14 at 12:59