+
+ public static workerPoolInUse(): boolean {
+ return [WorkerProcessType.DYNAMIC_POOL, WorkerProcessType.STATIC_POOL].includes(Configuration.getWorkerProcess());
+ }
+
+ public static workerDynamicPoolInUse(): boolean {
+ return Configuration.getWorkerProcess() === WorkerProcessType.DYNAMIC_POOL;
+ }
+
+ /**
+ * Generate a cryptographically secure random number in the [0,1[ range
+ *
+ * @returns
+ */
+ public static secureRandom(): number {
+ return crypto.randomBytes(4).readUInt32LE() / 0x100000000;
+ }