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, #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.



31
32
33
34
35
# File 'lib/async/reactor.rb', line 31

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

Class Method Details

.runObject

Deprecated.

Replaced by Kernel::Async.



27
28
29
# File 'lib/async/reactor.rb', line 27

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