process.send()
The method that sends a JavaScript value over the IPC channel to the other side, which receives it as a message event.
In more detail
Values are serialized on the way, so functions and class instances do not survive the trip. Only processes started with an IPC channel, such as by fork(), have it.
Related terms
- child_process.fork() — The node:child_process function that starts another Node.js process running a given script, with a built-in message channel to it.
- inter-process communication — The ways separate running programs pass data to each other, such as pipes, sockets, shared memory and signals.
Taught in
- Child Processes: spawn, execFile, fork & IPC — Node.js Internals & Backend Services
- Thread Pooling: Piscina & CPU-Bound Workload Pools — Node.js Internals & Backend Services