Fixed thread unsafe flush method.

This commit is contained in:
David Schury 2015-09-17 18:58:13 +02:00
parent e12c50a8a5
commit 2175b00814

View File

@ -60,6 +60,7 @@ protected:
public:
void flush() override
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
for (auto iter = _sinks.begin(); iter != _sinks.end(); iter++)
(*iter)->flush();
}