[fpc-pascal] Delphi compatible anonymous functions

Craig Peterson craig at scootersoftware.com
Thu May 22 18:17:51 CEST 2014


On 5/22/2014 2:35 AM, Michael Schnell wrote:
> For complex asynchronous  events, I tested this:
> 
>  - Define a class (sibling of TObject) ) that holds some data and the
> procedure to be used in the asynchronous callback.
>  - To through the callback event, create an instance and fill the data
> structure

This is exactly the "data marshalling" I was talking about.  Our
application is heavily asynchronous and it isn't an exaggeration to say
that there are hundreds of different calls with different functions and
parameter lists.  Having to define a new object, or even just a new
method and record and fill in that data is a lot of code, and
consequently there are plenty of cases that would benefit from more
asynchronous behavior or parallism that don't do so.

-- 
Craig Peterson
Scooter Software




More information about the fpc-pascal mailing list