Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #4819 > unrolled thread
| Started by | Horizon68 <horizon@horizon.com> |
|---|---|
| First post | 2018-12-29 15:40 -0800 |
| Last post | 2018-12-29 15:40 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.programming.threads
A portable and efficient implementation of a future in Delphi and FreePascal version 1.0 Horizon68 <horizon@horizon.com> - 2018-12-29 15:40 -0800
| From | Horizon68 <horizon@horizon.com> |
|---|---|
| Date | 2018-12-29 15:40 -0800 |
| Subject | A portable and efficient implementation of a future in Delphi and FreePascal version 1.0 |
| Message-ID | <q090lb$7bh$4@dont-email.me> |
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.
Back to top | Article view | comp.programming.threads
csiph-web