INNER CODE UNIT · Python
max_fd
briscverse/ryp · ryp.py:1517
max_fd = -1
handlers = _rlib.R_InputHandlers
while handlers != _ffi.NULL:
fd = handlers.fileDescriptor
if fd > 0: # i.e. not stdin
# The next line is equivalent to FD_SET(fd, read_mask)
read_mask.fds_bits[fd // NFDBITS] |= 1 << (fd % NFDBITS)
max_fd = max(max_fd, fd)
handlers = handlers.next
if select(max_fd + 1, read_mask, _ffi.NULL, _ffi.NULL, timeval) > 0:
return read_mask
else:
return _ffi.NULL
def _handle_plot_events() -> None:
"""
Handle plot events. Starts running in a background thread when the user