Boost logo

Boost :

Subject: Re: [boost] [fiber] new version in vault
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-11-29 18:30:35

Am Sunday 29 November 2009 22:25:21 schrieb Vicente Botet Escriba:
> Oliver Kowalke-2 wrote:
> > I've uploaded a new version of boost.fiber - main features are:

I haven't found it in the vault, is it still there?
is the version in the sandbox the most current?

> I have a question. I understand we need fibers::mutex and
> fibers::condition_variable, but could you explain why do we need a
> separated fibers::lock_guard and fibers::unique_lock template classes? Why
> the ones from Boost.Thread are not usable in the fiber context, at the end
> the Mutex parameter can be any model of lockable?

the mutexes are also almost independent of fibers, aren't they?
they are CAS-based mutexes that could be used with threads as well, except for
the call to this_fiber::yield().
CAS-based mutexes are long overdue for Boost.Thread. (I've even used random
mutex sharing just to avoid the 24 bytes overhead a pthreads mutex is worth,
for something that's basically a CAS-protected bool). so a mutex template
with a parameter on what to do to waste some time (this_fiber::yield,
this_thread::yield, spinning...) could clean this up.
Boost.Interprocess also has its share of mutexes AND its own

it doesn't make much sense to have seperate synchronization code for
Processes, Threads and Fibers.
(with some exceptions, like named mutexes in Boost:Interprocess)

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