[fpc-devel] Extension request to TThread extensions

Michael Schnell mschnell at lumino.de
Wed Aug 20 11:38:42 CEST 2014

On 08/20/2014 11:12 AM, Michael Van Canneyt wrote:

> You can perfectly work around this by implementing 
> Application.QueueAsnycCall so that it creates a thread which does the 
> call to TThread.Queue.

Do you mean that for an implementation of "Application.QueueAsyncCall" I 
  - Check if we are in the Main thread
  - if yes create a Dummy TThread
  - in the Execute procedure of the TThread do nothing but call 
  - have the TThread terminate itself and free the TThread object.


I agree that this is possible but for me it is a decently clumsy workaround.

OTOH, as supposedly nobody ever on purpose  calls 
Application.QueueAsyncCall from the main thread it does not do much harm 
(other than eating up some bytes of memory).

But provided this we can also just leave the implementation I did in 
it's current state and ignore the small incompatibility.


More information about the fpc-devel mailing list