|
Boost : |
Subject: Re: [boost] [fiber] on schedulers and wakeups
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2015-09-10 01:57:53
> // make a context ready
> void signal(context* waiter)
> {
> if(waiter->preferred_scheduler != this_scheduler)
> {
> // cross thread
> waiter->preferred_scheduler->remote_add(waiter);
> }
> else { // no preference or local
> this->scheduler.next_ready.push_back(waiter);
> // alternatively push this_context to back of queue and
> yield to waiter immediately
> }
> }
>
to push a ready fiber to the scheduler from a waitable (mutex,
condtion-variable ...) might be
a better solution than signaling via an atomic. I'll branch and test your
suggestion.
thx
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk