From: Jérôme Benoit Date: Thu, 16 Nov 2023 17:50:09 +0000 (+0100) Subject: refactor: refine TS example X-Git-Tag: v3.0.6~24 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=31e4bacafa8f46d5ee2e015200f5f7037d3e731e;p=poolifier.git refactor: refine TS example Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/pool.ts b/examples/typescript/pool.ts index 3d9d9e6f..de49c93a 100644 --- a/examples/typescript/pool.ts +++ b/examples/typescript/pool.ts @@ -38,3 +38,9 @@ export const dynamicPool = new DynamicThreadPool>( } } ) + +// eslint-disable-next-line @typescript-eslint/no-misused-promises +setTimeout(async () => { + await fixedPool.destroy() + await dynamicPool.destroy() +}, 3000)