Martin
2018-11-11 16:58:32 UTC
Hi,
assuming code like this.
SomeThread.Terminate;
SomeThread.WaitFor;
and assuming that SomeThread has at some time before that done
Thread.Queue(..., SomeHandler)
And the queued item had not run yet.
Is WaitFor guaranteed (or supposed) do have the queued message handled?
I know it waits for thread.Syncronize(), because the thread waits, and
it waits for the thread.
I also checked that 3.0.4 done *not* wait for the queued message (it may
process it, but that is random).
I assume that if the code (in the main thread) wants to be sure, that
SomeHandler (from the queued event) is not called anymore, then it has
to explicitly call CheckSynchronize() ?
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.fre
assuming code like this.
SomeThread.Terminate;
SomeThread.WaitFor;
and assuming that SomeThread has at some time before that done
Thread.Queue(..., SomeHandler)
And the queued item had not run yet.
Is WaitFor guaranteed (or supposed) do have the queued message handled?
I know it waits for thread.Syncronize(), because the thread waits, and
it waits for the thread.
I also checked that 3.0.4 done *not* wait for the queued message (it may
process it, but that is random).
I assume that if the code (in the main thread) wants to be sure, that
SomeHandler (from the queued event) is not called anymore, then it has
to explicitly call CheckSynchronize() ?
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.fre