Home > @lynx-js/template-webpack-plugin > LynxEncodePlugin > encodePool
LynxEncodePlugin.encodePool property
Shared TASM encode worker pool: multiple entries (and multipleLynxEncodePlugin instances in the same process) share its worker slots for parallel encode; watch-mode rebuilds keep the same workers warm. availableParallelism() honors cgroup CPU limits (containers, CI runners), so we don't need to subtract a core ourselves.
The pool is created on first access. Importing this module therefore neither loads tinypool nor starts worker threads, so a build without a native Lynx bundle (the web target, or a build in the browser through@rspack/browser) never needs worker_threads.
Signature:

