7 Jan
2014
7 Jan
'14
6:19 p.m.
2014/1/7 Oliver Kowalke
2014/1/7 Antony Polukhin
* 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