Games Node.js Thread Pool

Thread Pool

libuv's four helpers, blocking calls, sockets and worker_threads.

0 / 7 levels · 0 / 21 ★Start playing ›
  1. Thread Pool

    The main thread is the one chef. Slow jobs like reading files or hashing go to four helpers in the back kitchen. Sockets need no helper: the operating system watches them. A worker thread is a second kitchen with its own chef, and you talk to it by passing notes.

Your rulebook

Finish a level to add its rule. Fill the book and you can explain all of this in an interview.

  1. 1Finish Files go to a helper to unlock this rule.
  2. 2Finish Only four helpers to unlock this rule.
  3. 3Finish Sockets skip the pool to unlock this rule.
  4. 4Finish Sync blocks the chef to unlock this rule.
  5. 5Finish Async keeps the chef free to unlock this rule.
  6. 6Finish A second kitchen to unlock this rule.
  7. 7Finish Notes are copies to unlock this rule.