EventLoop: add methodd IsInside()
Track which thread runs the EventLoop and provide a check whether we're currently inside.
This commit is contained in:
@@ -23,7 +23,12 @@
|
||||
void
|
||||
EventLoop::Run()
|
||||
{
|
||||
assert(thread == nullptr);
|
||||
thread = g_thread_self();
|
||||
|
||||
g_main_loop_run(loop);
|
||||
|
||||
assert(thread == g_thread_self());
|
||||
}
|
||||
|
||||
guint
|
||||
|
Reference in New Issue
Block a user