mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
Fixed thread unsafe flush method.
This commit is contained in:
parent
e12c50a8a5
commit
2175b00814
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user