api/classes/yieldcount
Globals / YieldCount
Class: YieldCount
The strategy signals yielding after a certain number of checks.
Hierarchy
-
↳ YieldCount
Index
Constructors
Properties
Methods
Constructors
constructor
+ new YieldCount(scheduler
: IScheduler, maxCount
: number): YieldCount
Defined in packages/core/lib/internals/YieldStrategy.ts:43
Parameters:
Name | Type | Default value |
---|---|---|
scheduler | IScheduler | - |
maxCount | number | Number.MAX_SAFE_INTEGER |
Returns: YieldCount
Properties
maxCount
• Readonly
maxCount: number
Defined in packages/core/lib/internals/YieldStrategy.ts:42
Methods
canYield
▸ canYield(): boolean
Overrides YieldStrategy.canYield
Defined in packages/core/lib/internals/YieldStrategy.ts:51
Returns: boolean
defer
▸ defer<T>(cb
: (...T: T) => unknown, ...T
: T): ICancellable
Overrides void
Defined in packages/core/lib/internals/YieldStrategy.ts:57
Type parameters:
Name | Type |
---|---|
T | unknown[] |
Parameters:
Name | Type |
---|---|
cb | (...T: T) => unknown |
...T | T |
Returns: ICancellable
init
▸ init(): void
Overrides YieldStrategy.init
Defined in packages/core/lib/internals/YieldStrategy.ts:63
Returns: void
insert
▸ insert<T>(cb
: (...T: T) => unknown, ...T
: T): ICancellable
Inherited from YieldStrategy.insert
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
Inherited from YieldStrategy.create
Defined in packages/core/lib/internals/YieldStrategy.ts:10
Parameters:
Name | Type |
---|---|
scheduler | IScheduler |
config | FiberConfig |
Returns: YieldStrategy