mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
doc: add setImmediate execute timing description
This commit is contained in:
1 parent
cd372510bb
commit
401cef797d
1 file changed
+4
-3
@@ -49,9 +49,10 @@ request the timer hold the program open. If the timer is already `ref`d calling
|
||||
|
||||
## setImmediate(callback, [arg], [...])
|
||||
|
||||
To schedule the "immediate" execution of `callback`. Returns an `immediateId`
|
||||
for possible use with `clearImmediate()`. Optionally you can also pass
|
||||
arguments to the callback.
|
||||
To schedule the "immediate" execution of `callback` after I/O events
|
||||
callbacks and before `setTimeout` and `setInterval` . Returns an
|
||||
`immediateId` for possible use with `clearImmediate()`. Optionally you
|
||||
can also pass arguments to the callback.
|
||||
|
||||
Immediates are queued in the order created, and are popped off the queue once
|
||||
per loop iteration. This is different from `process.nextTick` which will
|
||||
|
||||
Reference in new issue
Block a user