Boost - Users mailing list wrote
On 14/09/2017 03:03, DePizzottri via Boost-users wrote:
I realized that pooled_fixed_stack is not thread safe. Now the question is how to make pooled_fixed_stack mutithread safe?
Fibers are usually bound to a single thread each; can't you just use a separate stack instance for each thread?
_______________________________________________ Boost-users mailing list
Boost-users@.boost
Yes, i tried to instantiate pfs as thread_local inside fiber routine that spawns other fibers: thread_local bf::pooled_fixedsize_stack salloc{ 2 * bf::pooled_fixedsize_stack::traits_type::page_size() }; crashes become rare, but did not completely disappear. I thought that allocate call to stack allocator appears only at fiber creation time inside parent's body, but it seems to be there is exists some other conditions that cause race. -- Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html