AsyncCallGuard
Make all calls to a function queued and asynchronously guarded
NPM
Install the module with: npm install asynccallguard
Usage
var AsyncCallGuard = ; var w = 100;var {console;};var f2 = ; // Make multiple calls;;;; // Produce:// MyGuard was called, waiting for 200ms before running f// []// MyGuard was called, waiting for 400ms before running f// [ 1, 2 ]// MyGuard was called, waiting for 800ms before running f// [ 3, 4 ]// MyGuard was called, waiting for 1600ms before running f// [ 5, 6, 7 ]
Release History
v1.0.0 - Initial commit (13 apr. 2012)
License
Copyright (c) 2013 Francois-Guillaume Ribreau Licensed under the MIT license.