class

Opal::Async::Worker

Inherits Reference < Object

Background asynchronous worker fiber inspired by Python Textual Workers. Executes long-running tasks concurrently without blocking terminal rendering or freezing input.

Constructors

new(name : String = "worker", &work : Worker -> String | Int32 | Int64 | Float64 | Bool | Nil)
Source

Instance methods

cancel

Requests worker cancellation

Source
cancelled?
Source
error
Source
name
Source
on_complete
Source
on_error
Source
on_progress
Source
progress
Source
report_progress(p : Float64) : Nil

Called by the worker block to report incremental completion percentage (0.0 to 1.0)

Source
result
Source
start

Spawns background execution fiber

Source
state
Source