mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
Added forgotten lock in backtracer
This commit is contained in:
parent
d1b97c0ba9
commit
b155347560
@ -39,6 +39,7 @@ public:
|
|||||||
// pop all items in the q and apply the give fun on each of them.
|
// pop all items in the q and apply the give fun on each of them.
|
||||||
void foreach_pop(std::function<void(const details::log_msg)> fun)
|
void foreach_pop(std::function<void(const details::log_msg)> fun)
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock{mutex_};
|
||||||
while (!messages_.empty())
|
while (!messages_.empty())
|
||||||
{
|
{
|
||||||
log_msg_buffer popped;
|
log_msg_buffer popped;
|
||||||
|
Loading…
Reference in New Issue
Block a user