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@.boost
> Boost-users mailing list
> https://lists.boost.org/mailman/listinfo.cgi/boost- users
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.