Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-02-21 17:15:10

> From: Paolo Coletta <paolo_at_[hidden]>
> Subject: Re: [boost] interest in a "signal flow" library?
> > Is there any interest in a library which facilitates the
> > implementation and interconnection of objects using Boost.Signals?
> Yes, much interest.
> [snip]
> I didn't look at the library yet, however, in a similar context I had the
> requirement to perform some operations in parallel. Thus, I wonder if this
> could be supported by the syntax, e.g.,
> video_generator >>= ( effect1 && effect2 ) >>= image_sum >>= display
> where effect1 and effect2 are executed in parallel (for example, by
> different threads of a thread_group); image_sum (which expects two
> arguments) is executed only when both effect1 and effect2 are completed.

That would be a good addition - right now you would have to do something like:

video_generator >>= effect1 >>= image_sum >>= display;
video_generator >>= effect2 >>= image_sum;


>= (effect1 >>= image_sum >>= display);
>= (effect2 >>= image_sum);

 - both of which are more awkward than video_generator >>= ( effect1
&& effect2 ) >>= image_sum >>= display. Also, image_sum would have to
take care of receiving the two signals separately (which would
probably require a use of slot_selector in the end) and combining them
together after both are received.

I'll think about this and try to add it in.



Boost list run by bdawes at, gregod at, cpdaniel at, john at