On Sun, Aug 24, 2008 at 11:51 AM, Manuel Jung
I wouldn't mind putting together a little example of something like this. Do you have a preference for either the above approaches? The first one would fit neatly into the existing dataflow.signals network, and for the other one we would have to implement a new type of connection. Not sure which one would be easier.
I think, i would prefer something more like the second approach, where the operators are altered. I have this in mind: You should just be able to user another type of conenction of components, an async typ, which uses a threadpool. This way you are still able to connect components the normal way so they get executed in one row (would be useful e.g. when the components are rather fast executed)
OK, I thought about this some... Unfortunately, the Dataflow library has some fundamental limitations when it comes to creating connections (you can't provide a parameter for the connection, e.g., to specify that it should be immediate vs. using a threadpool), so the only way to change the type of the connection is to change the type of the components being connected. This will make it harder to implement the second approach, which aims to leave the components in tact. Here are some examples that implement new connection types allowing consumers to track their producers: http://svn.boost.org/svn/boost/sandbox/SOC/2007/signals/libs/dataflow/exampl... http://svn.boost.org/svn/boost/sandbox/SOC/2007/signals/libs/dataflow/exampl...
An example would be really great! Do you know the proposed threadpool library?
I just downloaded it and need to study it a bit. When I figure out how to use it, I'll work on the example. Kind regards, Stjepan