UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

82 lines (38 loc) 1.33 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [EWorkerPoolOverflowMode](./rc-js-util.eworkerpooloverflowmode.md) ## EWorkerPoolOverflowMode enum How to handle jobs which don't "overflow", i.e. the workers cannot keep up with the work being sent. **Signature:** ```typescript export declare enum EWorkerPoolOverflowMode ``` ## Enumeration Members <table><thead><tr><th> Member </th><th> Value </th><th> Description </th></tr></thead> <tbody><tr><td> Noop </td><td> `3` </td><td> Do nothing, it's up to you to choose an action. </td></tr> <tr><td> Synchronous </td><td> `2` </td><td> If no worker is able to accept the job, the job runs on the producer (caller) thread. This automatically "fixes" backpressure by throttling the caller thread. This will result in degraded performance on the producer thread (often the UI thread) which is not always desirable. </td></tr> <tr><td> Throw </td><td> `1` </td><td> Delete the job and then throw a [NestedError](./rc-js-util.nestederror.md) with a cause of [WorkerPoolErrorCause.overflow](./rc-js-util.workerpoolerrorcause.overflow.md)<!-- -->. </td></tr> </tbody></table>