On Fri, 1 Jul 2016, Dennis wrote:

Apart from the TThreadMethod and TDataEvent, what are the major differences?
Are both of them thread safe to call from non-main thread?
Will both of them overwrite some queue or buffer if the queues are full?

I tried to study the source code but I cannot find the implementation parts.
I only find the interface parts of TThread classesh.inc

To the best of my knowledge:

Application.QueueAsyncCall has nothing to do with threads. This is an LCL method which can be used to insert a callback in the message loop.
I think it unlikely that this is thread-safe, I suspect it is only for the
main thread.

TThread.Queue schedules a call for execution in the main thread. It is meant for use in other threads.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to