/**
* Array with a maximum length and shifting items when full.
*
+ * @typeParam T - Type of items.
* @internal
*/
export class CircularArray<T> extends Array<T> {
*
* @returns Whether to create a dynamic worker or not.
*/
- private shallCreateDynamicWorker (): boolean {
- return this.type === PoolTypes.dynamic && !this.full && this.internalBusy()
- }
+ protected abstract shallCreateDynamicWorker (): boolean
/**
* Sends a message to worker given its worker node key.
)
}
+ /** @inheritDoc */
+ protected shallCreateDynamicWorker (): boolean {
+ return !this.full && this.internalBusy()
+ }
+
/** @inheritDoc */
protected get type (): PoolType {
return PoolTypes.dynamic
this.workerNodes[workerNodeKey].worker.off('message', listener)
}
+ /** @inheritDoc */
+ protected shallCreateDynamicWorker (): boolean {
+ return false
+ }
+
/** @inheritDoc */
protected get type (): PoolType {
return PoolTypes.fixed
)
}
+ /** @inheritDoc */
+ protected shallCreateDynamicWorker (): boolean {
+ return !this.full && this.internalBusy()
+ }
+
/** @inheritDoc */
protected get type (): PoolType {
return PoolTypes.dynamic
)
}
+ /** @inheritDoc */
+ protected shallCreateDynamicWorker (): boolean {
+ return false
+ }
+
/** @inheritDoc */
protected get type (): PoolType {
return PoolTypes.fixed
* @param measurementStatistics - The measurement statistics to update.
* @param measurementRequirements - The measurement statistics requirements.
* @param measurementValue - The measurement value.
- * @param numberOfMeasurements - The number of measurements.
* @internal
*/
const updateMeasurementStatistics = (