Worker.prototype.unref - Node documentation
method Worker.prototype.unref

Usage in Deno

import { Worker } from "node:worker_threads";
Worker.prototype.unref(): void

Calling unref() on a worker allows the thread to exit if this is the only active handle in the event system. If the worker is already unref()ed callingunref() again has no effect.

Return Type

void