mirror of
https://github.com/azure/login.git
synced 2026-06-07 18:17:07 +00:00
* Bump lodash from 4.17.15 to 4.17.19 (#52) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * Bump @actions/core from 1.1.3 to 1.2.6 (#60) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * updating node_nodules * updated package-lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
No EOL
1.9 KiB
TypeScript
51 lines
No EOL
1.9 KiB
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
/// <reference types="node" />
|
|
import { ChildMessage, OnEnd, OnStart, WorkerInterface, WorkerOptions } from '../types';
|
|
/**
|
|
* This class wraps the child process and provides a nice interface to
|
|
* communicate with. It takes care of:
|
|
*
|
|
* - Re-spawning the process if it dies.
|
|
* - Queues calls while the worker is busy.
|
|
* - Re-sends the requests if the worker blew up.
|
|
*
|
|
* The reason for queueing them here (since childProcess.send also has an
|
|
* internal queue) is because the worker could be doing asynchronous work, and
|
|
* this would lead to the child process to read its receiving buffer and start a
|
|
* second call. By queueing calls here, we don't send the next call to the
|
|
* children until we receive the result of the previous one.
|
|
*
|
|
* As soon as a request starts to be processed by a worker, its "processed"
|
|
* field is changed to "true", so that other workers which might encounter the
|
|
* same call skip it.
|
|
*/
|
|
export default class ChildProcessWorker implements WorkerInterface {
|
|
private _child;
|
|
private _options;
|
|
private _request;
|
|
private _retries;
|
|
private _onProcessEnd;
|
|
private _fakeStream;
|
|
private _stdout;
|
|
private _stderr;
|
|
private _exitPromise;
|
|
private _resolveExitPromise;
|
|
constructor(options: WorkerOptions);
|
|
initialize(): void;
|
|
private _shutdown;
|
|
private _onMessage;
|
|
private _onExit;
|
|
send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void;
|
|
waitForExit(): Promise<void>;
|
|
forceExit(): void;
|
|
getWorkerId(): number;
|
|
getStdout(): NodeJS.ReadableStream | null;
|
|
getStderr(): NodeJS.ReadableStream | null;
|
|
private _getFakeStream;
|
|
}
|
|
//# sourceMappingURL=ChildProcessWorker.d.ts.map
|