root / HServer / 00.Server / 00.Program / node_modules / async / setImmediate.js
이력 | 보기 | 이력해설 | 다운로드 (1.32 KB)
| 1 |
'use strict';
|
|---|---|
| 2 |
|
| 3 |
Object.defineProperty(exports, "__esModule", {
|
| 4 |
value: true |
| 5 |
}); |
| 6 |
|
| 7 |
var _setImmediate = require('./internal/setImmediate'); |
| 8 |
|
| 9 |
var _setImmediate2 = _interopRequireDefault(_setImmediate);
|
| 10 |
|
| 11 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 12 |
|
| 13 |
/**
|
| 14 |
* Calls `callback` on a later loop around the event loop. In Node.js this just
|
| 15 |
* calls `setImmediate`. In the browser it will use `setImmediate` if
|
| 16 |
* available, otherwise `setTimeout(callback, 0)`, which means other higher
|
| 17 |
* priority events may precede the execution of `callback`.
|
| 18 |
*
|
| 19 |
* This is used internally for browser-compatibility purposes.
|
| 20 |
*
|
| 21 |
* @name setImmediate
|
| 22 |
* @static
|
| 23 |
* @memberOf module:Utils
|
| 24 |
* @method
|
| 25 |
* @alias nextTick
|
| 26 |
* @category Util
|
| 27 |
* @param {Function} callback - The function to call on a later loop around
|
| 28 |
* the event loop. Invoked with (args...).
|
| 29 |
* @param {...*} args... - any number of additional arguments to pass to the
|
| 30 |
* callback on the next tick.
|
| 31 |
* @example
|
| 32 |
*
|
| 33 |
* var call_order = [];
|
| 34 |
* async.nextTick(function() {
|
| 35 |
* call_order.push('two');
|
| 36 |
* // call_order now equals ['one','two']
|
| 37 |
* });
|
| 38 |
* call_order.push('one');
|
| 39 |
*
|
| 40 |
* async.setImmediate(function (a, b, c) {
|
| 41 |
* // a, b, and c equal 1, 2, and 3
|
| 42 |
* }, 1, 2, 3);
|
| 43 |
*/
|
| 44 |
exports.default = _setImmediate2.default; |
| 45 |
module.exports = exports['default'];
|