CodeZettaInterview Hub

Node.js · Processes · Senior · Comparison

When to use worker_threads vs child_process?

Short Interview Answer

Threads share memory optionally with less process overhead; child_process stronger isolation and crash containment.

Detailed Explanation

Native addons and CPU tasks often use threads; separate memory space or different runtimes use processes.

Did you know this answer?