2011/10/25 Marco van de Voort <mar...@stack.nl>:
> 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  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to