---
url: /process-functions/process-join.md
description: Runs every process queued with process.fork and waits for them all to finish.
---

# process.join

Runs every process queued with [process.fork](/process-functions/process-fork) at the same time, and waits for them all to finish. The script continues once the slowest one is done. The queue is then cleared, so the next `fork` starts a new one.

```js
process.join()
```

## Examples

```js
// Schedule several processes for concurrent execution.
process.fork("process1");
process.fork("process2", { "param1": "value1" });

// Start the execution of the forked processes and wait for them to complete.
process.join();
// Script execution continues here after all forked processes have been executed and completed.
```

## Related

* [process.fork](/process-functions/process-fork)
