File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ Status PipePosix::CreateNew(bool child_processes_inherit) {
108108}
109109
110110Status PipePosix::CreateNew (llvm::StringRef name, bool child_process_inherit) {
111- std::scoped_lock<std::mutex, std::mutex> (m_read_mutex, m_write_mutex);
111+ std::scoped_lock<std::mutex, std::mutex> guard (m_read_mutex, m_write_mutex);
112112 if (CanReadUnlocked () || CanWriteUnlocked ())
113113 return Status (" Pipe is already opened" );
114114
@@ -146,7 +146,7 @@ Status PipePosix::CreateWithUniqueName(llvm::StringRef prefix,
146146
147147Status PipePosix::OpenAsReader (llvm::StringRef name,
148148 bool child_process_inherit) {
149- std::scoped_lock<std::mutex, std::mutex> (m_read_mutex, m_write_mutex);
149+ std::scoped_lock<std::mutex, std::mutex> guard (m_read_mutex, m_write_mutex);
150150
151151 if (CanReadUnlocked () || CanWriteUnlocked ())
152152 return Status (" Pipe is already opened" );
You can’t perform that action at this time.
0 commit comments