api/classes/yieldduration
Globals / YieldDuration
Class: YieldDuration
Yields after a quantified amount of time has passed.
Hierarchy
-
↳ YieldDuration
Index
Constructors
Properties
Methods
Constructors
constructor
+ new YieldDuration(scheduler
: IScheduler, maxDuration
: number): YieldDuration
Defined in packages/core/lib/internals/YieldStrategy.ts:71
Parameters:
Name | Type |
---|---|
scheduler | IScheduler |
maxDuration | number |
Returns: YieldDuration
Properties
maxDuration
• Readonly
maxDuration: number
Defined in packages/core/lib/internals/YieldStrategy.ts:74
Methods
canYield
▸ canYield(): boolean
Overrides YieldStrategy.canYield
Defined in packages/core/lib/internals/YieldStrategy.ts:78
Returns: boolean
defer
▸ defer<T>(cb
: (...T: T) => unknown, ...T
: T): ICancellable
Overrides void
Defined in packages/core/lib/internals/YieldStrategy.ts:81
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:87
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