metaapi.cloud-sdk
Version:
SDK for MetaApi, a professional cloud forex API which includes MetaTrader REST API and MetaTrader websocket API. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). CopyFactory copy trading API included. (https://metaapi.cloud)
33 lines (27 loc) • 792 B
text/typescript
import type AsyncProcessPool from '../abstract/asyncProcessPool';
import ProcessContext from '../abstract/processContext';
// import ChildProcessPool from '../child/childPool';
import type RootProcessPool from './rootProcessPool';
/**
* Process context
*/
class RootProcessContext extends ProcessContext {
private _pool: RootProcessPool<any>;
/**
* Constructs instance
* @param processId process ID
* @param pool pool the process is running in
*/
constructor(poolContext: AsyncProcessPool.Context) {
super(poolContext, poolContext.pool /*, ChildProcessPool */);
this._pool = poolContext.pool;
}
/**
* Returns pool the process is running in
* @returns process pool
*/
get pool() {
return this._pool;
}
}
export default RootProcessContext;