On 08/06/11 16:28, Krzysztof wrote:
Hm, I forgot about Application.QueueAsyncCall. And this can be safely call from thread without TThread.Synchronize() ? Because I don't want use Synchronize() in any part of thread code. So this is correct code? :procedure TMyThread.Execute; begin // <some code here> Application.QueueAsyncCall(@SomeObj.TestMethod, PtrInt(NewStr('Some value'))); // <some code here> end; There is no chance for deadlock with main thread calling this from inside another thread?
You have to protect it with a critical section (if you have more than one thread calling QueueAsyncCall).
Henry -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
