Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My portable and efficient implementation of a future in Delphi and FreePascal was updated to version 1.1

11 views
Skip to first unread message

Horizon68

unread,
Apr 10, 2019, 11:24:15 AM4/10/19
to
Hello..


My portable and efficient implementation of a future in Delphi and
FreePascal was updated to version 1.1


You can download it from:

https://sites.google.com/site/scalable68/a-portable-and-efficient-implementation-of-a-future-in-delphi-and-freepascal


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.

Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/

Required FPC switches: -O3 -Sd

-Sd for delphi mode....

Required Delphi XE-XE7 and Tokyo switch: -$H+ -DXE

You can configure it as follows from inside defines.inc file:

{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems

- Platform: Windows, Unix and Linux (x86)



Thank you,
Amine Moulay Ramdane.

0 new messages