Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #4819
| From | Horizon68 <horizon@horizon.com> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | A portable and efficient implementation of a future in Delphi and FreePascal version 1.0 |
| Date | 2018-12-29 15:40 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <q090lb$7bh$4@dont-email.me> (permalink) |
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 comp.programming.threads | Previous | Next | Find similar | Unroll thread
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
csiph-web