Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (13 sloc) 0.366 kB
local ffi = require('ffi')
local timer = require('timer')
local timeout = 20
local success = false
ffi.cdef[[ int poll(struct pollfd *fds, unsigned long nfds, int timeout); ]]
-- On the next tick the poll will have unblocked the run loop
timer.setTimeout(1, function()
p(success)
assert(success)
end)
if ffi.C.poll(nil, 0, timeout) then
success = true
end
Jump to Line
Something went wrong with that request. Please try again.