module

Pylon::Fibers

Crystal swallows an exception left unhandled in a fiber and any waiter continues on partial data. Every fiber should be spawned through here, which re-raises the exception in the waiter or, with no waiter, ends the process.

Constants

WORKER_THREADS = System.cpu_count.to_i * 2

Instance methods

await(results : Channel(T | Exception)) : T forall T
Source
detach(name : Name, &block : -> ) : Nil
Source
future
Source
isolated(name : Name, work : Blocking) : Nil
Source
parallel(name : Name, workers : Int32, &block : Int32 -> ) : Nil
Source

Nested types