| >> single kernel thread > This is pretty much how JavaScript operates > javascript has exactly 1 thread No disagreement here.
I understand what you are saying. Would be great if you had tried to understand what I said. Maybe my explanation is lacking. Let me quote pron. > Again, threads — at least in this context — [...] refer only to the abstraction allowing programmers to write sequences of code that can run and pause. https://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.ht... An kernel thread running code line-by-line is a "thread"; callbacks that are sequenced (and have the dreaded pyramid indentation hell) forms a "thread"; when an async function is called there is also a "thread". In JavaScript the latter two kinds of "threads" are run by one single kernel thread, i.e. N:1 threading. |