[fpc-pascal] TThread.Queue vs TThread.Synchronize
silvioprog
silvioprog at gmail.com
Mon Feb 23 19:32:16 CET 2015
On Mon, Feb 23, 2015 at 3:23 PM, Sven Barth <pascaldragon at googlemail.com>
wrote:
[...]=== code begin ===
>
> procedure TMyThread.Execute;
> var
> s: String;
>
> procedure SyncOnPrint;
> begin
> fOnPrint(s);
> end;
>
> begin
> s := 'Hello World';
> Queue(@SyncOnPrint);
> end;
>
> === code end ===
How to compile it?:
Error: Incompatible type for arg no. 1: Got "<address of procedure is
nested;Register>", expected "<procedure variable type of procedure of
object;Register>".
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150223/1c419fb2/attachment.html>
More information about the fpc-pascal
mailing list