def wait(object_list, timeout=None):
if timeout is not None:<EOL><INDENT>if timeout <= <NUM_LIT:0>:<EOL><INDENT>return _poll(object_list, <NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>deadline = monotonic() + timeout<EOL><DEDENT><DEDENT>while True:<EOL><INDENT>try:<EOL><INDENT>return _poll(object_list, timeout)<EOL><DEDENT>except (OSError, IOError, socket.error) as e:  <EOL><INDENT>if e.errno != errno.EINTR:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>if timeout is not None:<EOL><INDENT>timeout = deadline - monotonic()<EOL><DEDENT><DEDENT>
Wait till an object in object_list is ready/readable.
Returns list of those objects which are ready/readable.