Method: IO#await_writable
- Defined in:
- lib/all/io.rb
#await_writable(opts = {}) ⇒ true
Suspends the current evaluation until IO is writable.
While waiting, the code jumps to the event loop and executes other evaluations that are ready to run in the meantime.
252 253 254 255 256 257 258 |
# File 'lib/all/io.rb', line 252 def await_writable(opts = {}) io_selector = Concurrently::EventLoop.current.io_selector io_selector.await_writer(self, Concurrently::Evaluation.current) await_resume! opts ensure io_selector.cancel_writer(self) end |