Skip to content

Commit 279cefb

Browse files
committed
Using lock_guard instead of scoped_lock
1 parent 9fec66a commit 279cefb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/tools/lldb-dap/DAPLog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "llvm/ADT/StringRef.h"
1111
#include "llvm/Support/raw_ostream.h"
1212
#include <chrono>
13-
#include <fstream>
1413
#include <mutex>
1514
#include <system_error>
1615

@@ -21,7 +20,7 @@ namespace lldb_dap {
2120
Log::Log(StringRef filename, std::error_code &EC) : m_stream(filename, EC) {}
2221

2322
void Log::WriteMessage(StringRef message) {
24-
std::scoped_lock<std::mutex> lock(m_mutex);
23+
std::lock_guard<std::mutex> lock(m_mutex);
2524
std::chrono::duration<double> now{
2625
std::chrono::system_clock::now().time_since_epoch()};
2726
m_stream << formatv("{0:f9} ", now.count()).str() << message << "\n";

0 commit comments

Comments
 (0)