Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #4995 > unrolled thread

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

Started byHorizon68 <horizon@horizon.com>
First post2019-04-10 08:24 -0700
Last post2019-04-10 08:24 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

  My portable and efficient implementation of a future in Delphi and FreePascal was updated to version 1.1 Horizon68 <horizon@horizon.com> - 2019-04-10 08:24 -0700

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

FromHorizon68 <horizon@horizon.com>
Date2019-04-10 08:24 -0700
SubjectMy portable and efficient implementation of a future in Delphi and FreePascal was updated to version 1.1
Message-ID<q8l1qt$gnm$5@dont-email.me>
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.

[toc] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web