diff -ru boost.orig/boost/signals2/connection.hpp boost/boost/signals2/connection.hpp
|
old
|
new
|
|
| 68 | 68 | nolock_disconnect(local_lock); |
| 69 | 69 | } |
| 70 | 70 | template<typename Mutex> |
| 71 | | void nolock_disconnect(garbage_collecting_lock<Mutex> &lock) const |
| | 71 | void nolock_disconnect(garbage_collecting_lock<Mutex> &lock_) const |
| 72 | 72 | { |
| 73 | 73 | if(_connected) |
| 74 | 74 | { |
| 75 | 75 | _connected = false; |
| 76 | | dec_slot_refcount(lock); |
| | 76 | dec_slot_refcount(lock_); |
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | virtual bool connected() const = 0; |
| … |
… |
|
| 118 | 118 | // shared_ptr to the slot in the garbage collecting lock, |
| 119 | 119 | // which will destroy the slot only after it unlocks. |
| 120 | 120 | template<typename Mutex> |
| 121 | | void dec_slot_refcount(garbage_collecting_lock<Mutex> &lock) const |
| | 121 | void dec_slot_refcount(garbage_collecting_lock<Mutex> &lock_arg) const |
| 122 | 122 | { |
| 123 | 123 | BOOST_ASSERT(m_slot_refcount != 0); |
| 124 | 124 | if(--m_slot_refcount == 0) |
| 125 | 125 | { |
| 126 | | lock.add_trash(release_slot()); |
| | 126 | lock_arg.add_trash(release_slot()); |
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| … |
… |
|
| 155 | 155 | const GroupKey& group_key() const {return _group_key;} |
| 156 | 156 | void set_group_key(const GroupKey &key) {_group_key = key;} |
| 157 | 157 | template<typename M> |
| 158 | | void disconnect_expired_slot(garbage_collecting_lock<M> &lock) |
| | 158 | void disconnect_expired_slot(garbage_collecting_lock<M> &lock_arg) |
| 159 | 159 | { |
| 160 | 160 | if(!m_slot) return; |
| 161 | 161 | bool expired = slot().expired(); |
| 162 | 162 | if(expired == true) |
| 163 | 163 | { |
| 164 | | nolock_disconnect(lock); |
| | 164 | nolock_disconnect(lock_arg); |
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | template<typename M, typename OutputIterator> |
| 168 | | void nolock_grab_tracked_objects(garbage_collecting_lock<M> &lock, |
| | 168 | void nolock_grab_tracked_objects(garbage_collecting_lock<M> &lock_arg, |
| 169 | 169 | OutputIterator inserter) const |
| 170 | 170 | { |
| 171 | 171 | if(!m_slot) return; |
| … |
… |
|
| 184 | 184 | ); |
| 185 | 185 | if(apply_visitor(detail::expired_weak_ptr_visitor(), *it)) |
| 186 | 186 | { |
| 187 | | nolock_disconnect(lock); |
| | 187 | nolock_disconnect(lock_arg); |
| 188 | 188 | return; |
| 189 | 189 | } |
| 190 | 190 | *inserter++ = locked_object; |