Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-02-16 20:23:53


On Mon, 16 Feb 2004 22:51:18 +0000 (UTC), Matthew Vogt wrote
> Jeff Garland <jeff <at> crystalclearsoftware.com> writes:

> > ACE has direct support for the paradigm. It's been a couple years since I
> > looked at it, but as I recall using a bunch of template magic object methods
> > are morphed into stubs that queue messages for the object thus disconnecting
> > the requesting thread from the execution of the method.
>
> This is an interesting idea, using the boundaries of objects as
> the interaction points between threads. I have no experience
> with this sort of threading, but your comments led me to sketch

Interestingly, neither do I -- other than being aware of the ideas and having
looked at how it might be applied. I never found an application where this
made more sense than thread pools or some other more pedestrian threading model...

> out a wrapper which could be used to give 'active object'
> behaviour to existing classes, which might provide a simple
> pattern for concurrency in some apps...
>
> Anyway:
>
> ...lengthy code example snipped...
>
> It may be of some utility, especially if it can be reworked to allow
> for interface inheritance from the wrapped object. If nothing else,
> it shows how lots of boost libraries can be combined in a short
> space of lines...

All I can say is wow and very impressive! I believe you have managed to
leverage the power of several boost libraries very nicely. Anyway, I think
the example is a bit contrived in that having the main thread block for a
response, but still very cool.

One of the interesting points of your example is that a cross-thread queue is
needed. Several people have mentioned this as a priority for the thread
library and I agree. Every multi-threaded app I've seen needs a cross-thread
queue...

> I'm sure it can stand a lot of refinement, but I can't be bothered
> working on it any more!

Too bad, seems like you could make a nice contribution :-(

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk