Hello..
A portable and efficient implementation of a future in Delphi and
FreePascal version 1.0
Author: Amine Moulay Ramdane.
Description:
A "future" is an object that promises to provide a value sometime in the
future. The value is computed in a background thread. When the
application needs the value, it requests the value from the future--if
the future isn't done, the application waits until the value is ready.
All the synchronization issues are hidden from the application.
Use the TFuture class by deriving a new class that overrides
the Compute method.
I have provided you with a demo inside the zip file, please look at it
inside testfuture.pas file.
You can download it from:
https://sites.google.com/site/scalable68/a-portable-and-efficient-implementation-of-a-future-in-delphi-and-freepascal
Required FPC switches: -O3 -Sd
-Sd for delphi mode....
Required Delphi XE-XE7 and Tokyo switch: -$H+ -DXE
{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems
{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems
- Platform: Windows, Unix and Linux
Thank you,
Amine Moulay Ramdane.