$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Nicolas Fleury (nfleury_at_[hidden])
Date: 2003-04-24 12:28:00
Douglas Gregor wrote:
> On Wednesday 23 April 2003 07:09 pm, Nicolas Fleury wrote:
> 
>>Hi,
>>
>>    I know we shouldn't assume the order of signals execution, but can
>>we assume it will be the same on all platforms, whatever that order is?
>>  It would be a big plus for unit testing.
> 
> 
> The ordering comes from the ordering of a multimap. You can't rely on the 
> ordering being stable across all platforms. So the answer is, probably, no.
I'm asking the question 'cause we have an event system similar in some 
ways to signals where I work (basically based on Vlissides' Multicast 
pattern), and this week we decided to change the implementation to use 
two instead structures instead of one to store handlers for each event 
type.  A first, a vector, to store an ordered list of event handlers and 
optimize iteration, and a second, a set, to optimize the check that an 
event handler is still connected (and not deleted) before dispatching to 
it.  This has simplified our life greatly since we do unit tests on 
multiple platforms.
So I ask myself if boost::signals should have a mechanism to use order 
of connection, even if it's more heavy.  Maybe just as a global option 
for all signals?  Preprocessor option?  Strategy or policy?  Of course, 
I don't know the code and if it has been already been discussed, I just 
flag the nice-to-have need for reproduceable results across platforms.
Regards,
Nicolas