Method: Async::Wrapper#wait_any
- Defined in:
- lib/async/wrapper.rb
#wait_any(duration = nil) ⇒ Object
Wait fo the io to become either readable or writable.
119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/async/wrapper.rb', line 119 def wait_any(duration = nil) raise WaitError if @any self.reactor = Task.current.reactor begin @any = Fiber.current wait_for(duration) ensure @any = nil @monitor.interests = interests if @monitor end end |