[fpc-pascal] TThread.Suspend
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Thu Jan 30 14:21:46 CET 2014
Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>>> Both yes, because anything but that was never fully supported with Resume in
>>> the first place.
>>>
>>>> Second question: now that Suspend is deprecated, what should a thread do
>>>> if it wants to stop processing pending a subsequent resume?
>>> Add a Tevent, and block on it. IOW nothing built-in.
>> OK, noted. But as a stylistic point it seems to me that this very basic
>> functionality has been ripped out of the RTL (Classes.TThread) and moved
>> into the FCL (Syncobjs.TEvent) leaving no adequate substitute.
>
> Classes was originally FCL too. That kind of thinking of RTL vs FCL based on
> functional division is outdated. Now it is mostly just compiler
> bootstrapping. (even more so since the recent creation of rtl-* packages)
Although it's still significant when it comes to documentation,
particularly when starting at e.g. http://lazarus-ccr.sourceforge.net/docs/
I'm trying to dig through things... if I recall correctly it's not
possible to do something like {$if defined(TThread.Resume) } but I
must admit that I'm having a hard time finding defined() at all, I
think
http://www.freepascal.org/docs-html/prog/progsu29.html#x35-340001.1.29
needs a link to
http://www.freepascal.org/docs-html/prog/progsu125.html#x137-1380002.4.1
or at least needs the name if the section it's pointing at tightened up.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list