diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 000851bc8a3c0a..27d4fb2a6a62fb 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -49,6 +49,10 @@ The above example spawns a Worker thread for each `parse()` call. In actual practice, use a pool of Workers instead for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit. +When implementing a worker pool, use the [`AsyncResource`][] API to inform +diagnostic tools (e.g. in order to provide asynchronous stack traces) about the +correlation between tasks and their outcomes. + ## worker.isMainThread