Last active
February 21, 2018 06:11
-
-
Save cdax/75eca6cbe8a29c3371b0c7d14700711c to your computer and use it in GitHub Desktop.
Controlled-Concurrency Queue example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://github.com/grofers/ccq/releases/download/v0.1.0/ccq-0.1.0.min.js"></script> | |
<script> | |
new Queue() | |
.add(function(callback) { callback(null, 1); }) | |
.add(function(callback) { callback(null, 2); }) | |
.add(function(callback) { callback(null, 3); }) | |
.await(function(results) { console.log(results); }); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment