Boost logo

Boost :

Subject: [boost] [fiber] destruction order fiasco
From: Tatsuyuki Ishi (ishitatsuyuki_at_[hidden])
Date: 2016-11-15 06:25:21

The fiber still makes use of the scheduling algorithm after main context
exits, which is a problem for my case that puts a stack-allocated shared
data to the algorithm.

Some points: I doubt
if the schwarz counter is needed; isn't it only one? I
don't think there's a need to wake it up; if it's sleeping, the thread is
blocked and it never enters here. This is the main problem: use-after-free.

Anyway, what I think is ideal is that just making the algorithm a reference
and assign it from the main context. An example of this approach is Qt's

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