|
Boost : |
From: Matt Hurd (matt.hurd_at_[hidden])
Date: 2005-06-12 20:54:59
>On 6/11/05, Peter Dimov <pdimov_at_[hidden]> wrote:
> Let's take a step back. Why would I use the message queue at all in a single
> threaded program? Its whole purpose is to enable inter-thread communication,
> right?
One way to look at it is that a mq just provides a quality of service
implementation detail for message passing. Message passing can be
quite generic, in small talk function / method invocation is referred
to as message passing. Buffering alone might be a reason rather than
inter-thread communication. One day a really useful lib that supports
abstraction of the end points and quality of service for message
passing that resolves to a function call, internal process message
queue, inter-process mechanism, inter machine mechanism and the like
might appear.
Being able to abstract the common locking mechanisms for this is important.
It is my recurring thought that the named parameter library,
serialisation lib, an improved concurrency lib and a socket lib have
an important role to play in a generic architecture lib that supports
such message passing abstractions that will allow us to build some
pretty innovative flexibility in our designs. The concept of a zero
overhead null mutex is essential to this.
matt.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk