code: def _wait_event(self, reading):
          "wait on our events"
          with self._registered(reading, not reading):
              (self._readable if reading else self._writable).wait()
  
          if scheduler.state.interrupted:
              raise IOError(errno.EINTR, "interrupted system call"f _wait_event(self, reading):
          "wait on our events"
          with self._registered(reading, not reading):
              (self._readable if reading else self._writable).wait()
  
          if scheduler.state.interrupted:
              raise IOError(errno.EINTR, "interrupted system call")
docs: wait on our events