[fpc-pascal] TThread.Queue vs TThread.Synchronize
Sven Barth
pascaldragon at googlemail.com
Tue Feb 24 17:19:28 CET 2015
Am 24.02.2015 16:38 schrieb "Marco van de Voort" <marcov at stack.nl>:
>
> In our previous episode, Michael Schnell said:
> > On this behalf, "Application.QueuAsyncCall" is more versatile.
> >
> > But it's easy with TThread.Queue, as well.
> >
> > - define a class (not to be derived from TThread) that holds the data
> > to be transferred and a procedure without parameters
> > - create an instance of that class
>
> (where to store that instance?)
There's no need to. You create the object and pass the objects handler
method to Queue/Synchronize. The handler method then does a Free at the end.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150224/2e8c2cf7/attachment.html>
More information about the fpc-pascal
mailing list