mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
null_mutex
This commit is contained in:
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user