Skip to main content
Worker.prototype.terminate - worker_threads - Node documentation
method Worker.prototype.terminate

Usage in Deno

import { Worker } from "node:worker_threads";
Worker.prototype.terminate(): Promise<number>

Stop all JavaScript execution in the worker thread as soon as possible. Returns a Promise for the exit code that is fulfilled when the 'exit' event is emitted.

Return Type

Promise<number>
Back to top