Boost logo

Boost :

Subject: Re: [boost] [fiber] new version in vault
From: Helge Bahmann (hcb_at_[hidden])
Date: 2009-12-01 07:18:19

On Tue, 1 Dec 2009, Stefan Strasser wrote:

> Am Tuesday 01 December 2009 11:05:26 schrieb Helge Bahmann:
>>> A hashed lock library would be welcome here, I'm sure.
>> Yes, this would be a really helpful addition to Boost.Thread --
>> implementing fallback for atomic operations is just not feasible without.
> could you explain this please?
> I use something like that myself, as a workaround, but I don't see how that is
> a desired solution.
> why would you hash to access something that should be one word in size?

There must be a fallback implementation if the processor cannot perform an
operation atomically -- and the template argument to atomic<> may for
example be a double-word which not every processor can access atomically.

> in makes sense if you try to avoid the pthread mutex memory overhead, but if
> you put effort into it wouldn't it make more sense to replicate exactly what
> pthreads does inside boost and avoid the overhead and the hashing?

I don't quite understand this comment -- what do you mean by "what
pthreads does inside boost" ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at