refactor: use zero sized dynamic pool in examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 14 Jan 2024 23:46:56 +0000 (00:46 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 14 Jan 2024 23:46:56 +0000 (00:46 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/typescript/http-client-pool/src/pool.ts
examples/typescript/smtp-client-pool/src/pool.ts

index 7fbb20d55ac803f0aac47dee1e287edccd234e63..673b71b894f19335f00aabb474f804cac7ffb99f 100644 (file)
@@ -9,7 +9,7 @@ const workerFile = join(
 )
 
 export const httpClientPool = new DynamicThreadPool<WorkerData, WorkerResponse>(
-  1,
+  0,
   availableParallelism(),
   workerFile,
   {
index 85fb4cdf94b187753900825f02720c8c60ff9450..2fc53c980b20b9f26590e3408382f88cd86ada62 100644 (file)
@@ -12,7 +12,7 @@ const workerFile = join(
 export const smtpClientPool = new DynamicThreadPool<
 WorkerData,
 SMTPTransport.SentMessageInfo
->(1, availableParallelism(), workerFile, {
+>(0, availableParallelism(), workerFile, {
   enableTasksQueue: true,
   tasksQueueOptions: {
     concurrency: 8