Class: Async::Stop::Later
- Inherits:
- 
      Object
      
        - Object
- Async::Stop::Later
 
- Defined in:
- lib/async/task.rb
Overview
Used to defer stopping the current task until later.
Instance Method Summary collapse
- #alive? ⇒ Boolean
- 
  
    
      #initialize(task)  ⇒ Later 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Create a new stop later operation. 
- 
  
    
      #transfer  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Transfer control to the operation - this will stop the task. 
Constructor Details
#initialize(task) ⇒ Later
Create a new stop later operation.
| 26 27 28 | # File 'lib/async/task.rb', line 26 def initialize(task) @task = task end | 
Instance Method Details
#alive? ⇒ Boolean
| 31 32 33 | # File 'lib/async/task.rb', line 31 def alive? true end | 
#transfer ⇒ Object
Transfer control to the operation - this will stop the task.
| 36 37 38 | # File 'lib/async/task.rb', line 36 def transfer @task.stop end |