api/classes/fiber
Globals / Fiber
Class: Fiber<A, E>
Fibers are data structures that provide you a handle to control the execution of its IO
.
Type parameters
Name | Description |
---|---|
A | The success value |
E | Exceptions that can be thrown |
Hierarchy
Fiber
Index
Properties
Accessors
Methods
Properties
abort
• Abstract
abort: QIO<void>
Defined in packages/core/lib/internals/Fiber.ts:69
await
• Abstract
await: QIO<Exit<A, E>>
Defined in packages/core/lib/internals/Fiber.ts:70
id
• Readonly
id: number = FIBER_ID.create()
Defined in packages/core/lib/internals/Fiber.ts:71
runtime
• Abstract
runtime: FiberRuntime
Defined in packages/core/lib/internals/Fiber.ts:72
Accessors
join
• get join(): QIO<A, E>
Defined in packages/core/lib/internals/Fiber.ts:73
Returns: QIO<A, E>
Methods
unsafeExecuteWith
▸ Static
unsafeExecuteWith<A, E>(io
: QIO<A, E>, runtime
: FiberRuntime, cb?
: CBExit<A, E>): ICancellable
Defined in packages/core/lib/internals/Fiber.ts:62
Uses a shared runtime to evaluate a QIO expression.
Returns a ICancellable
that can be used to interrupt the execution.
Type parameters:
Name |
---|
A |
E |
Parameters:
Name | Type |
---|---|
io | QIO<A, E> |
runtime | FiberRuntime |
cb? | CBExit<A, E> |
Returns: ICancellable