mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-15 08:01:30 +08:00
null_mutex
This commit is contained in:
parent
068a0e3a6b
commit
a72de9d279
17
include/c11log/details/null_mutex.h
Normal file
17
include/c11log/details/null_mutex.h
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
// null, no cost mutex
|
||||
|
||||
namespace c11log {
|
||||
namespace details {
|
||||
struct null_mutex
|
||||
{
|
||||
void lock() {}
|
||||
void unlock() {}
|
||||
bool try_lock()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user