mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
Fixed thread unsafe flush method.
This commit is contained in:
@@ -60,6 +60,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
void flush() override
|
void flush() override
|
||||||
{
|
{
|
||||||
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
|
||||||
for (auto iter = _sinks.begin(); iter != _sinks.end(); iter++)
|
for (auto iter = _sinks.begin(); iter != _sinks.end(); iter++)
|
||||||
(*iter)->flush();
|
(*iter)->flush();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user