Class: Async::Reactor

Inherits:
Scheduler show all
Defined in:
lib/async/reactor.rb

Overview

A wrapper around the the scheduler which binds it to the current thread automatically.

Instance Attribute Summary

Attributes inherited from Node

#annotation, #children, #head, #parent, #tail

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Scheduler

#address_resolve, #async, #block, #close, #closed?, #fiber, #interrupt, #io_read, #io_wait, #io_write, #kernel_sleep, #process_wait, #push, #raise, #resume, #run, #run_once, supported?, #timeout_after, #to_s, #transfer, #unblock, #with_timeout, #yield

Methods inherited from Node

#The parent node.=, #annotate, #backtrace, #children?, #consume, #description, #finished?, #print_hierarchy, #root, #stop, #stopped?, #terminate, #to_s, #transient?, #traverse

Constructor Details

#initializeReactor

Returns a new instance of Reactor.



18
19
20
21
22
# File 'lib/async/reactor.rb', line 18

def initialize(...)
	super
	
	Fiber.set_scheduler(self)
end

Class Method Details

.runObject

Deprecated.

Replaced by Kernel::Async.



14
15
16
# File 'lib/async/reactor.rb', line 14

def self.run(...)
	Async(...)
end

Instance Method Details

#scheduler_closeObject



24
25
26
# File 'lib/async/reactor.rb', line 24

def scheduler_close
	self.close
end