Class: Libuv::Check
- Inherits:
- 
      Handle
      
        - Object
- Q::Promise
- Q::DeferredPromise
- Handle
- Libuv::Check
 
- Defined in:
- lib/libuv/check.rb
Constant Summary
Constants included from Assertions
Constants inherited from Q::Promise
Instance Attribute Summary
Attributes inherited from Handle
Instance Method Summary collapse
- 
  
    
      #initialize(loop, callback = nil, &blk)  ⇒ Check 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Check. 
- 
  
    
      #progress(callback = nil, &blk)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Used to update the callback that will be triggered on loop check. 
- 
  
    
      #start  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Enables the check handler. 
- 
  
    
      #stop  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Disables the check handler. 
Methods inherited from Handle
#active?, #close, #closing?, #ref, #unref
Methods included from Assertions
#assert_block, #assert_boolean, #assert_type
Methods included from Resource
#check_result, #check_result!, #resolve, #to_ptr
Methods inherited from Q::DeferredPromise
Methods inherited from Q::Promise
Constructor Details
#initialize(loop, callback = nil, &blk) ⇒ Check
Returns a new instance of Check.
| 10 11 12 13 14 15 16 17 18 | # File 'lib/libuv/check.rb', line 10 def initialize(loop, callback = nil, &blk) @loop = loop @callback = callback || blk check_ptr = ::Libuv::Ext.allocate_handle_check error = check_result(::Libuv::Ext.check_init(loop.handle, check_ptr)) super(check_ptr, error) end | 
Instance Method Details
#progress(callback = nil, &blk) ⇒ Object
Used to update the callback that will be triggered on loop check
| 37 38 39 | # File 'lib/libuv/check.rb', line 37 def progress(callback = nil, &blk) @callback = callback || blk end |