|
Boost : |
Subject: Re: [boost] [interprocess] (OS X) waiting on condition variable = CPU 100% + fans running loud
From: Peter Dimov (lists_at_[hidden])
Date: 2013-01-06 17:59:52
Ion Gaztañaga wrote:
> 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.)
These were in boost/detail at first, but I moved them into smart_ptr/detail
so that it's clear to which library they belong; given that we'll be moving
to separate repositories, this was obviously a good idea. :-)
For the spinlocks, the way forward is to use std::atomic_flag, and much of
the other stuff is also obsoleted by the C++11 atomics. Unfortunately, I was
unable to get yield(k) into the standard.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk