Subject: Re: [boost] first steps to submitting - boost :: observers
From: Robert McInnis (r_mcinnis_at_[hidden])
Date: 2016-09-18 22:22:29
On Sunday, September 18, 2016 9:54 PM Gavin Lambert said:
> I'm not sure I'm parsing that explanation correctly, but Signals2 is a
> thread-safe event-raising mechanism; it can thus be used to raise events
> single instance or static class-based, as desired.
> Typically the observee/publisher provides the event/signal, but other
> be possible with some finagling, if such is desired -- and it's fairly
> to build hybrid patterns with it such as subscribing to a container to
> subscribe to the container's contents (assuming that the container tracks
One of the examples I provided was a stock feed/portfolio management
The 'market' consisted of just 16 stock symbols and their associated market
price when I was
making the example.
1000 portfolios were generated with 5-16 buy orders initially pushed (assume
10 positions on average).
Any buy orders would also be tracked and would also force an update of the
I then generated 2000 random StockTicks and pushed them thru the market
individually, simulating a
ticker plant. This would trigger the necessary updates only to those
portfolios containing the stock, as
well as updating the overall portfolio value.
This example took about 20 minutes to code, with a few more minutes to tweak
the output to make it
How would you do that with the Signals2 object?