Boost logo

Boost :

Subject: Re: [boost] Boost.Fiber - interruptible fibers
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-01-11 15:52:00


Le 11/01/14 19:40, Oliver Kowalke a écrit :
> 2014/1/11 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>
>
>> Boost.Thread interruption feature adds some overhead to all the
>> synchronization functions that are interruption_points.
>> It is too late for Boost.Thread, but what do you think about having a
>> simple fiber class and an interruptible::fiber class?
>>
> boost.fiber already support interruption
> (boost::fibers::fiber::interrupt()) - in contrast to boost.thread it is
> simply a flag in an atomic variable.
>
Do you mean that the cost of the managing interruptible threads is null?
Don't forget that you need to manage with the waiting condition
variables so that you can interrupt the fiber, which has some cost
independently of whether you use an atomic or a mutex.

The same argument you are using to support several schedulers should
apply here, as it is evident to me that the interruption management has
a performance cost.

Best,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk