chore: migrate to eslint 9
[poolifier.git] / examples / typescript / pool.ts
index 3965e1f0a1cd4c8e2632b59018972e79fa5b798e..5d3d8e756833d84775d24bde59a975792da5b94b 100644 (file)
@@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'
 import {
   availableParallelism,
   DynamicThreadPool,
-  FixedThreadPool
+  FixedThreadPool,
 } from 'poolifier'
 
 import type { MyData, MyResponse } from './worker.js'
@@ -23,7 +23,7 @@ const fixedPool = new FixedThreadPool<MyData, MyResponse>(
     },
     errorHandler: (e: Error) => {
       console.error(e)
-    }
+    },
   }
 )
 
@@ -39,13 +39,12 @@ const dynamicPool = new DynamicThreadPool<MyData, MyResponse>(
     },
     errorHandler: (e: Error) => {
       console.error(e)
-    }
+    },
   }
 )
 
 await dynamicPool.execute()
 
-// eslint-disable-next-line @typescript-eslint/no-misused-promises
 setTimeout(async () => {
   await fixedPool.destroy()
   await dynamicPool.destroy()