class Async::Scheduler

def io_write(io, buffer, length, offset = 0)

def io_write(io, buffer, length, offset = 0)
	fiber = Fiber.current
	
	if timeout = get_timeout(io)
		timer = @timers.after(timeout) do
			fiber.raise(::IO::TimeoutError, "Timeout while waiting for IO to become writable!")
		end
	end
	
	@selector.io_write(fiber, io, buffer, length, offset)
ensure
	timer&.cancel!
end