Date: 1999-12-29 09:20:16
> > > I recall a convincing presentation to the committee
> > > that you can't trust library-based threading because
> > > optimizers might reorder operations around the library
> > > calls. That might be what Bjarne was referring to.
> > >
> > But we do have language support -- 'volatile' introduces sequence points
> > (1.9p7), so I would assume that it would be possible to write such a
> > that the compiler could not reorder. Interesting, though, I never
> > of this before. . .
> It's not optimization within the library call that hurts,
> it's optimization around the library call, so it you would
> have to put volatile in your own code to protect it from
> thread switches. I think it's sort of like the restrictions
> on setjmp, but I hurd this talk years ago and don't recall
> the deatials.
Are we talking about writing a threading library? I thought we were talking
about writing a consistent interface for existing APIs (Win32, pthreads,
P.S. Gaby - why isn't 'volatile' portable? All it means is "don't optimize
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk