api/classes/yieldstrategy
Globals / YieldStrategy
Class: YieldStrategy
Base type Fiber Yield Strategy Fiber can use various mechanisms to decide when to yield.
Hierarchy
YieldStrategy
Index
Methods
Methods
canYield
▸ Abstract
canYield(): boolean
Defined in packages/core/lib/internals/YieldStrategy.ts:23
Returns: boolean
init
▸ Abstract
init(): void
Defined in packages/core/lib/internals/YieldStrategy.ts:24
Returns: void
insert
▸ insert<T>(cb
: (...T: T) => unknown, ...T
: T): ICancellable
Defined in packages/core/lib/internals/YieldStrategy.ts:25
Type parameters:
Name | Type |
---|---|
T | unknown[] |
Parameters:
Name | Type |
---|---|
cb | (...T: T) => unknown |
...T | T |
Returns: ICancellable
create
▸ Static
create(scheduler
: IScheduler, config
: FiberConfig): YieldStrategy
Defined in packages/core/lib/internals/YieldStrategy.ts:10
Parameters:
Name | Type |
---|---|
scheduler | IScheduler |
config | FiberConfig |
Returns: YieldStrategy