boostorg/fiber

Launching fiber on a different thread

beojan opened this issue · 3 comments

beojan commented

I'd like to launch fibers on a pool of worker threads, but not the main thread. Currently, I'm using shared_work scheduler in all the threads, launching fibers with launch::post and simply not calling this_thread::yield from the main thread in the hope that the fibers will just get scheduled on one of the workers (which are waiting on a condition variable). However, it seems with this setup my fibers never run at all.

beojan commented

Turns out I was actually trying to launch from a thread where I hadn't set the scheduler. Nevertheless, it would be nice to be able to launch fibers on other threads.

olk commented

Unfortunately you always need a scheduler, it is not possible to use fibers without a scheduler.

beojan commented