mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 06:04:34 +00:00
5ccc756c56
There is a seemingly unavoidable race condition when waiting for data on
the X11 display connection, as long as any other thread is also making
Xlib calls. The event data we are waiting for could be read by the
other thread as part of looking for the reply to its request, before our
poll has begun.
This commit replaces the X11 event sent by glfwPostEmptyEvent with
writing to an unnamed pipe. The race condition remains if other Xlib
calls are made on other threads, but glfwPostEmptyEvent should now be
race-free.
This commit is based on work by pcwalton, OlivierSohn, kovidgoyal and
joaodasilva.
Closes #2033
Related to #379
Related to #1281
Related to #1285
(cherry picked from commit
|
||
---|---|---|
.. | ||
build.dox | ||
CMakeLists.txt | ||
CODEOWNERS | ||
compat.dox | ||
compile.dox | ||
context.dox | ||
CONTRIBUTING.md | ||
Doxyfile.in | ||
DoxygenLayout.xml | ||
extra.css | ||
extra.css.map | ||
extra.scss | ||
footer.html | ||
header.html | ||
input.dox | ||
internal.dox | ||
intro.dox | ||
main.dox | ||
monitor.dox | ||
moving.dox | ||
news.dox | ||
quick.dox | ||
spaces.svg | ||
SUPPORT.md | ||
vulkan.dox | ||
window.dox |