class Async::IO::Stream

def close

Best effort to flush any unwritten data, and then close the underling IO.
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