Unverified Commit c639483d authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Merge pull request #735 from jwnimmer-tri/dist_sink_reset

add remove_all_sinks method to dist_sink
parents 032035e7 b3881b9c
...@@ -62,6 +62,12 @@ public: ...@@ -62,6 +62,12 @@ public:
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex); std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
_sinks.erase(std::remove(_sinks.begin(), _sinks.end(), sink), _sinks.end()); _sinks.erase(std::remove(_sinks.begin(), _sinks.end(), sink), _sinks.end());
} }
void remove_all_sinks()
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
_sinks.clear();
}
}; };
using dist_sink_mt = dist_sink<std::mutex>; using dist_sink_mt = dist_sink<std::mutex>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment