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

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to