|
Boost : |
From: Sami Väisänen (sami.vaisanen_at_[hidden])
Date: 2007-03-30 05:46:11
Hello,
I've been working on a small library on top of boost::thread. The basic
premise is to practice concurrent programming by having the threads
communicate only through message queues.
With the library I am able to send messages of any user defined type (as
long as they are copy constructible and assignable) between threads to
different queues. The library has 2 types of queues, an in memory_queue
implemented simply with a std::deque and a native_queue. The
native_queue can provide a wait handle so the queue can be waited on
with some platform specific methods.
It is also possible to send "sync" messages that will force the threads
communicating through the message queues to rendezvous. This is useful
e.g. when a thread needs to request some additional information before
it can continue processing.
regards,
Sami
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk