Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2007-03-07 15:51:28


On Wednesday 07 March 2007 14:08 pm, Jason Turner wrote:
> Personally, I am less interested in the algorithmic side and more
> interested in the non-intrusive active_object<> style wrapper, with
> asynchronous return types. Either way, it seems this is an idea whose
> time has come and I would love to see some implementation make its way
> into boost.
>
> If your implementation is further along than my own and more generic,
> I would be interested in providing help if you need it.

I'll whip up some basic doxygen documentation so the library interface is
more intelligible. I'll try to get the code and documentation online
somewhere before this weekend, and you can see if it interests you.

I arrived at active objects from thinking about doing some kind of dataflow
programming in C++. The highest level class in my code is an active
function class, which both returns a future and takes futures as
arguments. That way, the main thread can setup the flow of data by
passing futures between active objects, and then leave them to their work.
For example, you might have a batch of objects you want to pass though a
pipeline of processing operations.

You can do things like assign a Future<T> to a Future<U> if T is implicitly
converible to U, without blocking. You can also extract elements from
future containers and such, like getting a Future<int> from a
Future<std::vector<int> > without blocking.

I'm not familiar with the boost::asio library, but I suspect there is stuff
in there I could (should) have made use of.

-- 
Frank



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