Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #4819
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| 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 | Sat, 29 Dec 2018 15:40:27 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 46 |
| Message-ID | <q090lb$7bh$4@dont-email.me> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 29 Dec 2018 23:40:27 -0000 (UTC) |
| Injection-Info | reader01.eternal-september.org; posting-host="8444bf63d0d893a9ddf735b777da3834"; logging-data="7537"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+t8Uy89piivTTZGrGgEzNOHSisBCesOwA=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
| Cancel-Lock | sha1:f4W01oWW/3KfOlBaX7O5vrfDUpI= |
| Content-Language | en-US |
| X-Mozilla-News-Host | news://news.eternal-september.org:119 |
| Xref | csiph.com comp.programming.threads:4819 |
Show key headers only | View raw
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