[Lazarus] Signal handling
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Wed Feb 20 10:16:11 CET 2013
Mark Morgan Lloyd wrote:
>> If I want to poll a variable set by an asynchronous unix-style signal,
>> i.e. that doesn't have an OS-level handle and where the latency should
>> probably be of the order of 100mSec, what's the most effective technique?
> If I understand correctly, the self pipe trick is probably best, then
> you don't have to poll, just add the handle to select().
But there's no handle, simply a (global) variable. This continues from
an earlier discussion where Sven was cautioning that about the only
thing you could do safely in a signal handler was set a (global)
variable: that bit I knew, but I don't know how best to deal with the
variable once set if there's no convenient timer etc. (I should have
threaded the question onto that, but I thought it was on a different list).
--
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 Lazarus
mailing list