|
Boost Users : |
Subject: Re: [Boost-users] [boost] Boost.Fiber mini-review September 4-13
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2015-09-05 15:06:35
>> > > because you mentioned you have already solved this problem you could
>> give
>> > > me a hint/some little help?
>>
>> We don't have a fiber_manager so we don't need to solve this problem.
>
> but you told us that you use TLS in your fibers and it is completely safe
> to migrate the fibers to other threads?!
> how do you achieve that a migrated fiber accesses the correct object,
> stored in TLS, of the current thread
> and not the object of the thread the fiber was migrated from?
I said that in certain contexts it is possible/useful to use TLS even from inside user code running on a fiber. Granted, those use cases are not very common.
HPX itself uses TLS to store
a) a reference to the current scheduler responsible for the particular kernel-thread, and
b) a reference to the currently active (running) fiber object.
Both uses are safe as they are maintained by the runtime.
Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net