Skip to main content
MessagePort.prototype.close - worker_threads - Node documentation
method MessagePort.prototype.close

Usage in Deno

import { MessagePort } from "node:worker_threads";
MessagePort.prototype.close(): void

Disables further sending of messages on either side of the connection. This method can be called when no further communication will happen over this MessagePort.

The 'close' event is emitted on both MessagePort instances that are part of the channel.

Return Type

void