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 81d58f5 commit 97e82ceCopy full SHA for 97e82ce
include/mp/proxy-io.h
@@ -298,6 +298,13 @@ struct Waiter
298
});
299
}
300
301
+ //! Mutex mainly used internally by waiter class, but also used externally
302
+ //! to guard access to related state. Specifically, since the thread_local
303
+ //! ThreadContext struct owns a Waiter, the Waiter::m_mutex is used to guard
304
+ //! access to other parts of the struct to avoid needing to deal with more
305
+ //! mutexes than necessary. This mutex can be held at the same time as
306
+ //! EventLoop::m_mutex as long as Waiter::mutex is locked first and
307
+ //! EventLoop::m_mutex is locked second.
308
std::mutex m_mutex;
309
std::condition_variable m_cv;
310
std::optional<kj::Function<void()>> m_fn;
0 commit comments