diff -urN toto/boost_1_32_0/boost/signals/connection.hpp boost_1_32_0/boost/signals/connection.hpp --- toto/boost_1_32_0/boost/signals/connection.hpp 2004-09-30 22:07:33.000000000 -0400 +++ boost_1_32_0/boost/signals/connection.hpp 2005-02-10 10:34:33.205296640 -0500 @@ -53,6 +53,7 @@ void* signal; void* signal_data; void (*signal_disconnect)(void*, void*); + bool blocked ; std::list bound_objects; }; @@ -69,6 +70,12 @@ connection(const connection&); ~connection(); + // Block he connection: if the connection is still active, there + // will be no notification + void block() ; + void unblock() ; + bool is_blocked() const ; + // Disconnect the signal and slot, if they are connected void disconnect() const; @@ -162,6 +169,18 @@ } }; + // Determines if the underlying connection is callable, ie if + // it is connected and not blocked + struct is_callable { + typedef connection_slot_pair argument_type; + typedef bool result_type; + + inline bool operator()(const argument_type& c) const + { + return c.first.connected() && !c.first.is_blocked() ; + } + }; + // Autodisconnects the bound object when it is destroyed unless the // release method is invoked. class auto_disconnect_bound_object { diff -urN toto/boost_1_32_0/boost/signals/detail/slot_call_iterator.hpp boost_1_32_0/boost/signals/detail/slot_call_iterator.hpp --- toto/boost_1_32_0/boost/signals/detail/slot_call_iterator.hpp 2004-07-24 22:29:29.000000000 -0400 +++ boost_1_32_0/boost/signals/detail/slot_call_iterator.hpp 2005-02-10 09:59:10.638975768 -0500 @@ -58,7 +58,8 @@ slot_call_iterator(Iterator iter_in, Iterator end_in, Function f) : iter(iter_in), end(end_in), f(f), cache() { - iter = std::find_if(iter, end, std::not1(is_disconnected())); + //iter = std::find_if(iter, end, std::not1(is_disconnected())); + iter = std::find_if(iter, end, is_callable()); } typename inherited::reference @@ -73,15 +74,20 @@ void increment() { - iter = std::find_if(++iter, end, std::not1(is_disconnected())); + //iter = std::find_if(++iter, end, std::not1(is_disconnected())); + iter = std::find_if(++iter, end, is_callable()); cache.reset(); } bool equal(const slot_call_iterator& other) const { - iter = std::find_if(iter, end, std::not1(is_disconnected())); + + //iter = std::find_if(iter, end, std::not1(is_disconnected())); + //other.iter = std::find_if(other.iter, other.end, + // std::not1(is_disconnected())); + iter = std::find_if(iter, end, is_callable()); other.iter = std::find_if(other.iter, other.end, - std::not1(is_disconnected())); + is_callable()); return iter == other.iter; }