[Lazarus] Thread finalization
cobines
cobines at gmail.com
Wed Sep 21 15:38:08 CEST 2011
Your thread calls OnTerminate via Synchronize and waits until the
callback finishes. In the callback you call Thread.Destroy which waits
until the thread finishes. It is a deadlock.
Other than using FreeOnTerminate=True, maybe periodically check from
the main thread the status of the thread. If it is finished then
destroy, but don't do it from OnTerminate.
--
cobines
More information about the Lazarus
mailing list