A main worker Thread A need to kick of a sub-worker Thread B and wait
for its termination.
Currently, A calls B.Run() and performs A.Suspend(). If B finishes,
it performs
A.Resume().
If B is quite fast, this may generate an ugly race condition: B
resumes A, but
A hasn't yet suspended. Even worse, A would suspend, once B resumed
it. Quite dead..
Thus, I feel a semaphore or such like is required. I suppose, I need
an atomic action,
which suspends A and - in parallel - restarts B.
Since I didn't find an RB solution, does someone has a snippet or a
good hint?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>