aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shell/viml_system_spec.lua
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2015-04-03 19:12:20 +0200
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2015-04-08 09:46:14 -0300
commit5f98c3272577f8633da489769372d47c26c0a894 (patch)
tree6e9982890e3f138cd973177f9d0a73a95afb3745 /test/functional/shell/viml_system_spec.lua
parent95db8df682ea7ac392a1e9a6de45a6ccc0727df1 (diff)
downloadrneovim-5f98c3272577f8633da489769372d47c26c0a894.tar.gz
rneovim-5f98c3272577f8633da489769372d47c26c0a894.tar.bz2
rneovim-5f98c3272577f8633da489769372d47c26c0a894.zip
event.c: Simplify timer use in event_poll()
event_poll() always leaves the libuv I/O loop after one iteration. The duration for how long the loop polls for I/O is given by the shortest timeout of all active timers. Is no timer active, I/O is/could be polled indefinitely. To make sure our timer is still active when I/O polling begins, a prepare handle is used to start the timer right before the polling. But by only using a timer that restarts after its timeout was reached, we also can assure that polling is done with (nearly) the same finite timeout. For a short explanation how the I/O loop is working, see http://docs.libuv.org/en/latest/design.html#the-i-o-loop.
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
0 files changed, 0 insertions, 0 deletions