We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eec4e44 commit 14e37b9Copy full SHA for 14e37b9
main/test/tests.cpp
@@ -12,15 +12,11 @@ namespace {
12
13
class Logger : public oatpp::base::Logger {
14
private:
15
- oatpp::concurrency::SpinLock::Atom m_atom;
+ oatpp::concurrency::SpinLock m_lock;
16
public:
17
18
- Logger()
19
- : m_atom(false)
20
- {}
21
-
22
void log(v_int32 priority, const std::string& tag, const std::string& message) override {
23
- oatpp::concurrency::SpinLock lock(m_atom);
+ std::lock_guard<oatpp::concurrency::SpinLock> lock(m_lock);
24
std::cout << tag << ":" << message << "\n";
25
}
26
0 commit comments