diff --git a/AsyncFunction.md b/AsyncFunction.md index 50281a1..a165f10 100644 --- a/AsyncFunction.md +++ b/AsyncFunction.md @@ -25,7 +25,7 @@ exports.main = main; ```js var STD = require("lib/std"); -function main(args) { +function onShoutcut(args) { [5, 4, 3, 2, 1].forEach(function(x) { new AsyncFunction('sub_01', 'mymodule').run(x); }); @@ -38,6 +38,13 @@ function _async_sub_01(args) { console.log(x); } +function main(args) { + if (!AsyncFunction.bind(exports, args) { + onShoutcut(args); + } +} + exports.main = main; +exprts.onShoutcut = onShoutcut; exports._async_sub_01 = _async_sub_01; ``` \ No newline at end of file