SetImmediate
[<Interface>]
type SetImmediate =
abstract member Invoke (callback: unit -> unit) : Immediate
abstract member Invoke<'TArgs> (callback: 'TArgs -> unit, args: 'TArgs) : Immediate
abstract member __promisify__<'T> (?value: 'T, ?options: TimerOptions) : Promise<'T>| Assembly | Xantham.Fable.Node |
Methods
abstract member Invoke (callback: unit -> unit) : Immediate
abstract member Invoke (callback: unit -> unit) : ImmediateSchedules the "immediate" execution of the callback after I/O events' callbacks.
When multiple calls to setImmediate() are made, the callback functions are queued for execution in the order in which they are created. The entire callback queue is processed every event loop iteration. If an immediate timer is queued from inside an executing callback, that timer will not be triggered until the next event loop iteration.
If callback is not a function, a TypeError will be thrown.
This method has a custom variant for promises that is available using timersPromises.setImmediate().
@since v0.9.1
| Parameter | |
|---|---|
callback | The function to call at the end of this turn of the Node.js Event Loop |
args | Optional arguments to pass when the callback is called. |
Returns. for use with clearImmediate()
abstract member Invoke<'TArgs> (callback: 'TArgs -> unit, args: 'TArgs) : Immediate
abstract member Invoke<'TArgs> (callback: 'TArgs -> unit, args: 'TArgs) : ImmediateSchedules the "immediate" execution of the callback after I/O events' callbacks.
When multiple calls to setImmediate() are made, the callback functions are queued for execution in the order in which they are created. The entire callback queue is processed every event loop iteration. If an immediate timer is queued from inside an executing callback, that timer will not be triggered until the next event loop iteration.
If callback is not a function, a TypeError will be thrown.
This method has a custom variant for promises that is available using timersPromises.setImmediate().
@since v0.9.1
| Parameter | |
|---|---|
callback | The function to call at the end of this turn of the Node.js Event Loop |
args | Optional arguments to pass when the callback is called. |
Returns. for use with clearImmediate()
abstract member __promisify__<'T> (?value: 'T, ?options: TimerOptions) : Promise<'T>