nanolith
Version:
Multi-threading in no time with seamless TypeScript support.
53 lines (52 loc) • 996 B
TypeScript
export declare enum ConcurrencyOption {
/**
* One thread per four cores.
*/
Quarter = "Quarter",
/**
* One thread per two cores.
*/
Half = "Half",
/**
* Default concurrency. Two threads per core (`x2`).
*/
Default = "x2",
/**
* One thread per core.
*/
x1 = "x1",
/**
* Two threads per core.
*/
x2 = "x2",
/**
* Four threads per core.
*/
x4 = "x4",
/**
* Six threads per core.
*/
x6 = "x6",
/**
* Eight threads per core.
*/
x8 = "x8",
/**
* Ten threads per core.
*/
x10 = "x10"
}
/**
* Set values to be used when multiplying the number of
* CPUs on the machine to generate a pool concurrency value.
*/
export declare const concurrencyOptionMultipliers: {
readonly Quarter: 0.25;
readonly Half: 0.5;
readonly x1: 1;
readonly x2: 2;
readonly x4: 4;
readonly x6: 6;
readonly x8: 8;
readonly x10: 10;
};