|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-09-01 18:38:48
On Fri, Sep 01, 2000 at 09:39:34AM +0100, Kevlin Henney wrote:
> In message <024b01c013ac$27171260$37781990_at_[hidden]>, Greg Colvin
> <gcolvin_at_[hidden]> writes
> >From: Daryle Walker <darylew_at_[hidden]>
> >>
> >> Doesn't C ,and therefore C++, have a "sig_atomic_t" type that works like
> >> this? (I mentioned this type during the thread discussions.) Could we use
> >> it somehow, without (always) resorting to platform-specific extensions?
> >
> >In a word, no. The C and C++ standards promise very little
> >(some would argue nothing) of any real use about sig_atomic_t.
>
> And the only things they do "promise" are related to signals, not to
> threading.
That's the same thing !
> Introducing a dependency on <csignal> would be misleading
> (threads and signals interact _badly_) and incorrect :-}
(signals interact badly with almost everything)
Why do you think that a shared unprotected (ie w/o locks) variable
of type volatile sig_atomic_t can't be used for inter-thread
communication ?
(BTW, I haven't been able to find specific guaranties about
sig_atomic_t in the C++ standard; are they hidden in the C
standard ? In particular, is sig_atomic_t()++ guarantied
to be atomic ?)
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk