X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fworker.ts;h=99c0d9a6feeea35815a520ff95a160d927bcc4fc;hb=ea2c5b8b3cee6a2d3915367d734c51628ef40551;hp=35d9f755bc3f9d4d321c8ac7b999261a3e1d613a;hpb=f741236338de5af620b672d81e49677759371298;p=poolifier.git diff --git a/src/pools/worker.ts b/src/pools/worker.ts index 35d9f755..99c0d9a6 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -172,6 +172,11 @@ export interface WorkerInfo { * This flag is set to `true` when worker node is stealing tasks from another worker node. */ stealing: boolean + /** + * Back pressure flag. + * This flag is set to `true` when worker node tasks queue has back pressure. + */ + backPressure: boolean /** * Task functions properties. */ @@ -325,6 +330,12 @@ export interface IWorkerNode * @returns The dequeued task. */ readonly dequeueTask: (bucket?: number) => Task | undefined + /** + * Dequeue last prioritized task. + * + * @returns The dequeued task. + */ + readonly dequeueLastPrioritizedTask: () => Task | undefined /** * Clears tasks queue. */