Thread safe
| 189 | |
| 190 | // Thread safe |
| 191 | void close() { |
| 192 | std::lock_guard<std::mutex> l(lock_); |
| 193 | if (!closed_) { |
| 194 | closed_ = true; |
| 195 | can_receive_.notify_all(); |
| 196 | if (work_queue_) { |
| 197 | work_queue_->add([this]() { this->receiver_.connection().close(); }); |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | private: |
| 203 | // ==== The following are called by proton threads only. |
nothing calls this directly
no test coverage detected