Boost logo

Boost :

Subject: Re: [boost] Announcing LEAF, a new error handling library suitable for low latency applications
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2018-11-15 01:30:36

On Wed, Nov 14, 2018 at 5:19 PM Gavin Lambert via Boost <
boost_at_[hidden]> wrote:

> On 15/11/2018 12:29, Emil Dotchevski wrote:
> > It uses thread_local raw pointers, one per error type. This is needed in
> > order to decouple result<T> from the static type of error objects being
> > propagated, which I consider critical, see
> >
> >
> >> Is it compatible with coroutines or fibers or other non-thread-based
> stacks?
> >
> > Good question. I'm not sure, but I'm interested to know what are the
> issues.
> In general AFAIK, any use of thread-local storage is entirely
> incompatible with coroutines or fibers. (Unless the mechanisms for both
> cooperate with each other, which is theoretically possible but I'm not
> aware of it occurring in the wild.)

The LEAF machinery that is used for multi-thread support can probably be
used as-is for coroutines as well.

It should be possible to explicitly support coroutines context switching,
which would be much faster, involving only setting raw pointers, possibly
exactly one raw pointer.

Boost list run by bdawes at, gregod at, cpdaniel at, john at