Method: Async::IO::Stream#close
- Defined in:
- lib/async/io/stream.rb
#close ⇒ Object
Best effort to flush any unwritten data, and then close the underling IO.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/async/io/stream.rb', line 216 def close return if @io.closed? begin flush rescue # We really can't do anything here unless we want #close to raise exceptions. ensure @io.close end end |