Subject: Re: [boost] GSoC: Boost.Pipeline -- scheduling of segments
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2014-07-02 05:30:15
2014-07-02 10:50 GMT+02:00 Benedek Thaler <thalerbenedek_at_[hidden]>:
> *Oliver*: I considered using coroutines, however I don't clearly see how
> this would solve this problem exactly. IIUC, Coroutines provide a way for a
> single thread to execute multiple methods. I'd need multiples threads
> executing multiple methods in a similar fashion. I'll continue thinking
> about this.
1.) 1 thread -> 1 method
- coroutines not required
2.) 1 thread -> n methods (coroutines or fibers)
- each coroutine/fiber could execute one method
- multple coroutines/fibers executed in one thread == thread executes
- you need to know when a method has to be executed/resumed -> synchro.
classes + scheduler required required -> fibers (boost.fiber)
- you could chain multiple threads (thread-pool?) with channels/queues
=> fixed sized thread-pool running arbitrary amount of methods
> I couldn't found it in the docs. Does Coroutine have any drawbacks?
it depends on what you want to achieve
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk