~/talk

The Node.js Event Loop: Not So Single Threaded

Talkat Silicon Valley Code Camp 2017 · 2017-10-07..10-08· [nodejs, concurrency]
slides:none on file

Node.js runs JavaScript on a single main thread but offloads work in three ways: CPU-heavy calls like pbkdf2 go to a reusable thread pool = 4 so parallel hashes queue when all workers are busy; network and some OS IO use kernel async and never tie up the pool; many file system and DNS lookups fall back to the thread pool. Expect blocking when CPU-bound work exceeds available cores or pool threads.

AI-written summary · about

  1. 0:00Introduction to multitasking
  2. 1:25Cooperative multitasking
  3. 5:05Pre-emptive multitasking
  4. 7:21Symmetric multi-threading
  5. 9:43Processes vs threads
  6. 15:23Node.js threading model
  7. 17:35Crypto and the thread pool
  8. 23:53Networking and event loops
  9. 28:44Inside the event loop
  10. 34:40Future of node threading
  11. 36:52Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.