
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.) Best, Ion