Re: [fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Mattias Gaertner
On Fri, 1 Jul 2016 17:47:58 +0200 (CEST) Michael Van Canneyt wrote: >[...] > 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,

Re: [fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Henry Vermaak
On Fri, Jul 01, 2016 at 05:47:58PM +0200, Michael Van Canneyt wrote: > 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

Re: [fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Michael Van Canneyt
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

[fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Dennis
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