$18 GRAYBYTE WORDPRESS FILE MANAGER $28

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/node_modules/npm/node_modules/bluebird/js/release/

HOME
Current File : /lib/node_modules/npm/node_modules/bluebird/js/release//async.js
"use strict";
var firstLineError;
try {throw new Error(); } catch (e) {firstLineError = e;}
var schedule = require("./schedule");
var Queue = require("./queue");
var util = require("./util");

function Async() {
    this._customScheduler = false;
    this._isTickUsed = false;
    this._lateQueue = new Queue(16);
    this._normalQueue = new Queue(16);
    this._haveDrainedQueues = false;
    this._trampolineEnabled = true;
    var self = this;
    this.drainQueues = function () {
        self._drainQueues();
    };
    this._schedule = schedule;
}

Async.prototype.setScheduler = function(fn) {
    var prev = this._schedule;
    this._schedule = fn;
    this._customScheduler = true;
    return prev;
};

Async.prototype.hasCustomScheduler = function() {
    return this._customScheduler;
};

Async.prototype.enableTrampoline = function() {
    this._trampolineEnabled = true;
};

Async.prototype.disableTrampolineIfNecessary = function() {
    if (util.hasDevTools) {
        this._trampolineEnabled = false;
    }
};

Async.prototype.haveItemsQueued = function () {
    return this._isTickUsed || this._haveDrainedQueues;
};


Async.prototype.fatalError = function(e, isNode) {
    if (isNode) {
        process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
            "\n");
        process.exit(2);
    } else {
        this.throwLater(e);
    }
};

Async.prototype.throwLater = function(fn, arg) {
    if (arguments.length === 1) {
        arg = fn;
        fn = function () { throw arg; };
    }
    if (typeof setTimeout !== "undefined") {
        setTimeout(function() {
            fn(arg);
        }, 0);
    } else try {
        this._schedule(function() {
            fn(arg);
        });
    } catch (e) {
        throw new Error("No async scheduler available\u000a\u000a    See http://goo.gl/MqrFmX\u000a");
    }
};

function AsyncInvokeLater(fn, receiver, arg) {
    this._lateQueue.push(fn, receiver, arg);
    this._queueTick();
}

function AsyncInvoke(fn, receiver, arg) {
    this._normalQueue.push(fn, receiver, arg);
    this._queueTick();
}

function AsyncSettlePromises(promise) {
    this._normalQueue._pushOne(promise);
    this._queueTick();
}

if (!util.hasDevTools) {
    Async.prototype.invokeLater = AsyncInvokeLater;
    Async.prototype.invoke = AsyncInvoke;
    Async.prototype.settlePromises = AsyncSettlePromises;
} else {
    Async.prototype.invokeLater = function (fn, receiver, arg) {
        if (this._trampolineEnabled) {
            AsyncInvokeLater.call(this, fn, receiver, arg);
        } else {
            this._schedule(function() {
                setTimeout(function() {
                    fn.call(receiver, arg);
                }, 100);
            });
        }
    };

    Async.prototype.invoke = function (fn, receiver, arg) {
        if (this._trampolineEnabled) {
            AsyncInvoke.call(this, fn, receiver, arg);
        } else {
            this._schedule(function() {
                fn.call(receiver, arg);
            });
        }
    };

    Async.prototype.settlePromises = function(promise) {
        if (this._trampolineEnabled) {
            AsyncSettlePromises.call(this, promise);
        } else {
            this._schedule(function() {
                promise._settlePromises();
            });
        }
    };
}

function _drainQueue(queue) {
    while (queue.length() > 0) {
        _drainQueueStep(queue);
    }
}

function _drainQueueStep(queue) {
    var fn = queue.shift();
    if (typeof fn !== "function") {
        fn._settlePromises();
    } else {
        var receiver = queue.shift();
        var arg = queue.shift();
        fn.call(receiver, arg);
    }
}

Async.prototype._drainQueues = function () {
    _drainQueue(this._normalQueue);
    this._reset();
    this._haveDrainedQueues = true;
    _drainQueue(this._lateQueue);
};

Async.prototype._queueTick = function () {
    if (!this._isTickUsed) {
        this._isTickUsed = true;
        this._schedule(this.drainQueues);
    }
};

Async.prototype._reset = function () {
    this._isTickUsed = false;
};

module.exports = Async;
module.exports.firstLineError = firstLineError;

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.02 AM
root / root
0755
any.js
0.411 KB
10 Mar 2021 9.36 PM
root / root
0644
assert.js
1.614 KB
10 Mar 2021 9.36 PM
root / root
0644
async.js
4.05 KB
10 Mar 2021 9.36 PM
root / root
0644
bind.js
1.924 KB
10 Mar 2021 9.36 PM
root / root
0644
bluebird.js
0.284 KB
10 Mar 2021 9.36 PM
root / root
0644
call_get.js
4.253 KB
10 Mar 2021 9.36 PM
root / root
0644
cancel.js
3.62 KB
10 Mar 2021 9.36 PM
root / root
0644
catch_filter.js
1.393 KB
10 Mar 2021 9.36 PM
root / root
0644
context.js
2.326 KB
10 Mar 2021 9.36 PM
root / root
0644
debuggability.js
29.63 KB
10 Mar 2021 9.36 PM
root / root
0644
direct_resolve.js
1.362 KB
10 Mar 2021 9.36 PM
root / root
0644
each.js
0.771 KB
10 Mar 2021 9.36 PM
root / root
0644
errors.js
3.63 KB
10 Mar 2021 9.36 PM
root / root
0644
es5.js
1.932 KB
10 Mar 2021 9.36 PM
root / root
0644
filter.js
0.307 KB
10 Mar 2021 9.36 PM
root / root
0644
finally.js
4.505 KB
10 Mar 2021 9.36 PM
root / root
0644
generators.js
7.579 KB
10 Mar 2021 9.36 PM
root / root
0644
join.js
8.025 KB
10 Mar 2021 9.36 PM
root / root
0644
map.js
5.251 KB
10 Mar 2021 9.36 PM
root / root
0644
method.js
1.727 KB
10 Mar 2021 9.36 PM
root / root
0644
nodeback.js
1.523 KB
10 Mar 2021 9.36 PM
root / root
0644
nodeify.js
1.608 KB
10 Mar 2021 9.36 PM
root / root
0644
promise.js
25.591 KB
10 Mar 2021 9.36 PM
root / root
0644
promise_array.js
5.084 KB
10 Mar 2021 9.36 PM
root / root
0644
promisify.js
11.896 KB
10 Mar 2021 9.36 PM
root / root
0644
props.js
3.044 KB
10 Mar 2021 9.36 PM
root / root
0644
queue.js
1.829 KB
10 Mar 2021 9.36 PM
root / root
0644
race.js
1.221 KB
10 Mar 2021 9.36 PM
root / root
0644
reduce.js
5.006 KB
10 Mar 2021 9.36 PM
root / root
0644
schedule.js
2.098 KB
10 Mar 2021 9.36 PM
root / root
0644
settle.js
1.233 KB
10 Mar 2021 9.36 PM
root / root
0644
some.js
3.866 KB
10 Mar 2021 9.36 PM
root / root
0644
synchronous_inspection.js
2.747 KB
10 Mar 2021 9.36 PM
root / root
0644
thenables.js
2.081 KB
10 Mar 2021 9.36 PM
root / root
0644
timers.js
2.339 KB
10 Mar 2021 9.36 PM
root / root
0644
using.js
7.349 KB
10 Mar 2021 9.36 PM
root / root
0644
util.js
10.279 KB
10 Mar 2021 9.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF