Boost logo

Boost :

Subject: Re: [boost] [interprocess] (OS X) waiting on condition variable = CPU 100% + fans running loud
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2013-01-06 14:49:45

El 06/01/2013 16:52, Peter Dimov escribió:
>> > It's maybe the biggest problem we have with Interprocess, sorry about
>> > that. Maybe you can avoid 100% CPU usage inserting sleeps between
>> atomic
>> > operation tries in interprocess_mutex or interprocess_condition
>> code. > Sorry
>> > about the bad news.
>> > Ion
> There's yield_k in <boost/smart_ptr/detail/yield_k.hpp> that could be
> useful here.

Peter, very interesting, thanks for the hint, I'll add a ticket to avoid
missing it. There are quite a few gems hidden under smart_ptr: very
interesting the implementation of spinlock_xxx.hpp primitives, I'm not a
threading expert but I guess these are more efficient that current full
barrier atomic compare-exchange based interprocess primitives.

Any chance to move those into boost/detail directory? These seem useful
outside smart_ptr (just like lightweight_mutex.hpp, interlocked.hpp, etc.)



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