Sha256: 39c894d1ec55aa2a19b959ebc203b476caa64567f4e2bcb9e48a91d444bb2784
Contents?: true
Size: 673 Bytes
Versions: 30
Compression:
Stored size: 673 Bytes
Contents
A sequence of instructions, defined by a block, which is executed sequentially and managed by the scheduler. A task can be in one of the following states: `initialized`, `running`, `completed`, `failed`, `cancelled` or `stopped`. ```mermaid stateDiagram-v2 [*] --> Initialized Initialized --> Running : Run Running --> Completed : Return Value Running --> Failed : Exception Completed --> [*] Failed --> [*] Running --> Stopped : Stop Stopped --> [*] Completed --> Stopped : Stop Failed --> Stopped : Stop Initialized --> Stopped : Stop ``` ## Example ```ruby require 'async' # Create an asynchronous task that sleeps for 1 second: Async do |task| sleep(1) end ```
Version data entries
30 entries across 30 versions & 1 rubygems