bingomanatee / gate Goto Github PK
View Code? Open in Web Editor NEWBlocks one or more callbacks til a set of asynchronoous actions complete
Blocks one or more callbacks til a set of asynchronoous actions complete
Its pretty easy to have a callback respond to a single action, or a series of chained actions. What if you want to have a callback respond to several asynchronous actions, at the time that they are ALL done? gate, short for aggregate, is meant to fill in that role. USE var gate = new require('gate')( function(){ console.log('done'); } ); for (var i = 0; i < 10; ++i) { gate.task_start(); setTimeout(gate.task_done, Math.random() * 10000); // note - we have no idea when the task done will be fired off - nor do we need to. } gate.start(); // at this point an interval function will check to see if all the tasks are done and will call the callback if they are. *************** WARNING ********************* this is the first commit - no testing has been done yet!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.