Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost] Boost.Fiber mini-review September 4-13
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2015-09-05 10:50:10


2015-09-05 16:36 GMT+02:00 Thomas Heller <thom.heller_at_[hidden]>:

> Oliver, do you mind providing the rationale for why fiber migration has
> been dropped or point me to the section in the docs discussing this?
>
of course, the documentation has a short description in the rational
section (http://olk.github.io/libs/fiber/doc/html/fiber/rationale.html).
I refer to Giovanni's more detailed explanation (
http://www.crystalclearsoftware.com/soc/coroutine/coroutine/coroutine_thread.html
).

because of compiler optimization the address of TLS might be
pre-calculated, the access to TLS might be moved out of a loop, etc.
even if boost.fiber would not use TLS (keyword thread_local), the usage of
TLS in the user-code (executed by a fiber) is not permitted -
this is an unacceptable restriction for users.

I suggest a pattern like boost.job proposes - on a logical processors a
worker-thread is pinned, running a pool of fibers (boost. job uses
some aspects of NUMA architectures). The jobs can be synchronized by
classes from boost.fiber.



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