class Concurrent::Future
def execute
- Example: Instance and execute in one line -
Example: Instance and execute in separate steps -
Returns:
-
(Future)
- a reference to `self`
def execute if compare_and_set_state(:pending, :unscheduled) @executor.post{ safe_execute(@task, @args) } self end end