Added comment on use of select(1).
This commit is contained in:
parent
14f352b9e3
commit
2d43238dc5
@ -1086,6 +1086,9 @@ void _glfwPlatformWaitEvents(void)
|
|||||||
|
|
||||||
XFlush(_glfw.x11.display);
|
XFlush(_glfw.x11.display);
|
||||||
|
|
||||||
|
// select(1) is used instead of an X function like XNextEvent, as the
|
||||||
|
// wait inside those are guarded by the mutex protecting the display
|
||||||
|
// struct, locking out other threads from using X (including GLX)
|
||||||
if (select(fd + 1, &fds, NULL, NULL, NULL) > 0)
|
if (select(fd + 1, &fds, NULL, NULL, NULL) > 0)
|
||||||
_glfwPlatformPollEvents();
|
_glfwPlatformPollEvents();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user