Boost logo

Boost Users :

From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2008-04-10 15:18:47


Hi Manuel

> The fifo_scheduler is limited to one execution at a time. I would like a
> schedule object, which can handle many processors in many threads at the
> same time. Lika a threadpool, where the threads takeover a fsm, when it
> has
> events posted and processes them then. But it should of course only one
> thread at a time process events from one machine.

Because of exactly this constraint, I believe such a thread pool servicing a
single state_machine would actually slow down event processing (because of
the locking/signalling overhead; dispatching one event takes a few
microseconds, tops). The only possible advantage I see is with load
balancing. E.g. when you have to limit yourself to e.g. 8 threads servicing
thousands of FSMs, of which only very few are busy processing events at the
same time.

> Maybe someone has done this and can show me his code? Or tell me if this
> is
> even possible?

Everything is possible, but I doubt that such a scheduler is of interest to
many people. Also, it is not exactly the main focus of this library.
fifo_scheduler & friends were always intended as a minimal but working
"example". I hope that a future boost lib will offer types that would render
fifo_scheduler obsolete and maybe offer something like you want.

HTH & Regards,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net