Browse files

doc: add setImmediate execute timing description

  • Loading branch information...
1 parent cd37251 commit 401cef797df39ca0e5d7a71b2202d6fc750ca912 @shigeki shigeki committed with Feb 6, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 doc/api/timers.markdown
View
7 doc/api/timers.markdown
@@ -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

0 comments on commit 401cef7

Please sign in to comment.