[fpc-pascal] TThread.Suspend
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Thu Jan 30 13:24:59 CET 2014
Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>> First question: is Start an accurate replacement for Resume,
>
> Yes.
>
>> or can it
>> only be used to start a thread created in the suspended state?
>
> Yes.
>
> 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.
--
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