summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2016-03-08 15:14:44 -0800
committerAlex Early <alexander.early@gmail.com>2016-03-08 15:14:44 -0800
commitf6a19cec4dae3afd3dfb53d07baabd88ce282b5c (patch)
tree8a08bdd1d4f0c50baecd902220b477b3b999200b /README.md
parentf51042c5510b4977a24a022a0bce729ffdc8d452 (diff)
parent1ebbcd722605476c3b9c9476a231baa76ed8c45f (diff)
downloadasync-f6a19cec4dae3afd3dfb53d07baabd88ce282b5c.tar.gz
Merge pull request #1053 from caolan/setimmediate-args
Pass extra args to setImmediate/nextTick.
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index c7ec1a1..d527b42 100644
--- a/README.md
+++ b/README.md
@@ -1568,7 +1568,7 @@ three
---------------------------------------
<a name="nextTick"></a>
-### nextTick(callback), setImmediate(callback)
+### nextTick(callback, [args...]), setImmediate(callback, [args...])
Calls `callback` on a later loop around the event loop. In Node.js this just
calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
@@ -1580,6 +1580,7 @@ This is used internally for browser-compatibility purposes.
__Arguments__
* `callback` - The function to call on a later loop around the event loop.
+* `args...` - any number of additional arguments to pass to the callback on the next tick
__Example__
@@ -1590,6 +1591,10 @@ async.nextTick(function(){
// call_order now equals ['one','two']
});
call_order.push('one')
+
+async.setImmediate(function (a, b, c) {
+ // a, b, and c equal 1, 2, and 3
+}, 1, 2, 3)
```
---------------------------------------