Boost logo

Boost :

Subject: Re: [boost] Boost.Fiber review January 6-15
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-01-07 13:19:47


2014/1/7 Oliver Kowalke <oliver.kowalke_at_[hidden]>

> 2014/1/7 Antony Polukhin <antoshkka_at_[hidden]>
>
> > * Are mutexes of Boost.Fiber thread safe?
> >
>
> you can use the mutexes from bosot.fiber in a multi-threaded env
> (but you have to use fibers in your code).
>

Thanks, already trying them.
What will happen on fiber::mutex.lock() call if all the fibers on current
thread are suspended? Will the mutex call `this_thread::yield()`?

> > * Can fibers migrate between threads?
> >
>
> yes - unit-test test_migration shows how it is done
>

Another implementation question:
Why there are so many atomics in fiber_base? Looks like fiber is usually
used in a single thread, and in situations when fiber is moved from one
thread to another memory barrier would be sufficient.

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk