class Async::Wrapper

def cancel_monitor

def cancel_monitor
	if @readable
		readable = @readable
		@readable = nil
		
		readable.resume(Cancelled.new)
	end
	
	if @writable
		writable = @writable
		@writable = nil
		
		writable.resume(Cancelled.new)
	end
	
	if @any
		any = @any
		@any = nil
		
		any.resume(Cancelled.new)
	end
	
	if @monitor
		@monitor.close
		@monitor = nil
	end
end