summaryrefslogtreecommitdiffstats
path: root/DOCS/man/en/input.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-15 21:33:31 +0100
committerwm4 <wm4@nowhere>2013-12-16 20:03:00 +0100
commite8f21b1f0ac499f672703bb7d382e19f9111b3e3 (patch)
tree40b8361523a51fb40cc0947ad7093d68a9495e47 /DOCS/man/en/input.rst
parent048bb2464dbd9a3f9d53cc0d044c05cb7e21ca5b (diff)
downloadmpv-e8f21b1f0ac499f672703bb7d382e19f9111b3e3.tar.bz2
mpv-e8f21b1f0ac499f672703bb7d382e19f9111b3e3.tar.xz
input: avoid using wakeup pipe if it's not needed
If input is not waiting for select(), writing to the wakeup pipe is wasteful, and, if there are many wakeups, might even block the wakeup threads if the pipe gets full. However, if it's waiting for select(), the wakup pipe must be used to unblock the waiting thread. Actually there's a small race condition: we might determine that the main thread is in select(), and write to the wakeup pipe (whether we do this while unlocked or locked doesn't really matter). Then, the main thread might leave select() before reading from the wakup pipe. This should be harmless, because at worst more wakeups than needed happen, but never fewer.
Diffstat (limited to 'DOCS/man/en/input.rst')
0 files changed, 0 insertions, 0 deletions