mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 17:22:06 +08:00
Made mutex member variable mutable
Classes inheriting from `base_sink` can now lock the base mutex inside their `const` member methods (e.g., basic accessors).
This commit is contained in:
parent
c5abaeddca
commit
9d3dde0900
@ -37,7 +37,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// sink formatter
|
// sink formatter
|
||||||
std::unique_ptr<spdlog::formatter> formatter_;
|
std::unique_ptr<spdlog::formatter> formatter_;
|
||||||
Mutex mutex_;
|
mutable Mutex mutex_;
|
||||||
|
|
||||||
virtual void sink_it_(const details::log_msg &msg) = 0;
|
virtual void sink_it_(const details::log_msg &msg) = 0;
|
||||||
virtual void flush_() = 0;
|
virtual void flush_() = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user