docs: def wait_for_interrupts(threaded=False, epoll_timeout=1):
      """
      Blocking loop to listen for GPIO interrupts and distribute them to
      associated callbacks. epoll_timeout is an easy way to shutdown the
      blocking function. Per default the timeout is set to 1 second; if
      `_is_waiting_for_interrupts` is set to False the loop will exit.
  
      If an exception occurs while waiting for interrupts, the interrupt
      gpio interfaces will be cleaned up (/sys/class/gpio unexports). In
      this case all interrupts will be reset and you'd need to add the
      callbacks again before using `wait_for_interrupts(..)` again.
  
      If the argument `threaded` is True, wait_for_interrupts will be
      started in a daemon Thread. To quit it, call
      `RPIO.stop_waiting_for_interrupts()`.
      """
      if threaded:
          t = Thread(target=_rpio.wait_for_interrupts, args=(epoll_timeout,))
          t.daemon = True
          t.start()
      else:
          _rpio.wait_for_interrupts(epoll_timeout)