Class: UV::Async

Inherits:
Object
  • Object
show all
Includes:
Handle
Defined in:
lib/uv/async.rb

Instance Method Summary collapse

Methods included from Handle

#active?, close, #close, #closing?, #ref, #unref

Methods included from Assertions

#assert_arity, #assert_block, #assert_boolean, #assert_signal, #assert_type

Methods included from Resource

#check_result, #check_result!, #to_ptr

Methods included from Listener

define_callback, undefine_callbacks

Constructor Details

#initialize(loop, async_ptr, &block) ⇒ Async

Returns a new instance of Async.



5
6
7
8
9
# File 'lib/uv/async.rb', line 5

def initialize(loop, async_ptr, &block)
  @async_block = block

  super(loop, async_ptr)
end

Instance Method Details

#callObject



11
12
13
14
15
# File 'lib/uv/async.rb', line 11

def call
  check_result UV.async_send(handle)

  self
end