2011/10/25 Marco van de Voort <[email protected]>:
> Equivalent solution with anon functions:
>
> targethread.queue(
> procedure(targetobject:ttargetobject;a:integer;b:someobject;c:string)
> begin
> targetobject.destinationprocedure(a,b,c);
> end;
shouldn't this be
targethread.queue(
procedure
begin
targetobject.destinationprocedure(a,b,c);
end;
without any parameters since all these variables are captured from the
current scope into the closure? The other thread should not need to
know anything about them to call it.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal