| 181 | subscriptions_[s] = 0; |
| 182 | } |
| 183 | void unsubscribe(Sender* s) { |
| 184 | DOUT(std::cerr << "Queue: " << this << "(" << name_ << ") unsubscribe Sender: " << s << "\n";); |
| 185 | // If we're about to erase the current subscription move on |
| 186 | if (current_ != subscriptions_.end() && current_->first==s) ++current_; |
| 187 | subscriptions_.erase(s); |
| 188 | s->add([=]{s->unsubscribed();}); |
| 189 | } |
| 190 | }; |
| 191 | |
| 192 | // We have credit to send a message. |
no test coverage detected