Use JsDoc default regexp
[poolifier.git] / examples / typescript / pool.ts
index 8e7d4bb7fd981c3bc1e01b80e716374e70187c53..96b861c44bf2127f1d9d55c521cfb4e244590dc7 100644 (file)
@@ -1,22 +1,22 @@
-import { join } from "path";
-import { DynamicThreadPool, FixedThreadPool } from "poolifier";
-import { MyData, MyResponse } from "./worker";
+import { join } from 'path'
+import { DynamicThreadPool, FixedThreadPool } from 'poolifier'
+import { MyData, MyResponse } from './worker'
 
 export const fixedPool = new FixedThreadPool<MyData, Promise<MyResponse>>(
   8,
-  join(__dirname, "worker.js"),
+  join(__dirname, 'worker.js'),
   {
-    errorHandler: (e) => console.error(e),
-    onlineHandler: () => console.log("Worker is online"),
+    errorHandler: e => console.error(e),
+    onlineHandler: () => console.log('Worker is online')
   }
-);
+)
 
 export const dynamicPool = new DynamicThreadPool<MyData, Promise<MyResponse>>(
   2,
   8,
-  join(__dirname, "worker.js"),
+  join(__dirname, 'worker.js'),
   {
-    errorHandler: (e) => console.error(e),
-    onlineHandler: () => console.log("Worker is online"),
+    errorHandler: e => console.error(e),
+    onlineHandler: () => console.log('Worker is online')
   }
-);
+)