Behind modern concurrency primitives
summary
Explains why heap‑allocated tasks beat OS threads for scalability (1 MB stack vs ~72 bytes per task, default stack historically 1 MB then 256 KB), shows eager TPL vs lazy F# async making the same code take 5s vs 10s, describes thread‑pool design with per‑worker queues plus work stealing and optional thread‑per‑core affinity that yields ~50% speedups in one JVM example, covers IO threads and Go/Erlang preemption, and warns that removing unnecessary async state machines raised throughput from 47 to 73,000,000 messages/sec.
AI-written summary · about
chapters (18)
- 0:00Start
- 2:12Agenda
- 4:09Why Have We Use Code That Is Async Await Instead of Using Plain Old Ordinary Thread Api
- 7:02Scalability
- 13:02Hardware Architecture
- 17:25Work Sealing
- 22:10Stratfor Core Architecture
- 29:00Schedulers
- 36:04Preemptive Schedulers
- 42:29Eager and Lazy Evaluation
- 46:29Async Functions
- 47:31Function Coloring
- 48:09Stack Locality
- 55:19Binding Operators
- 55:47Async State Machines
- 1:00:30Summary
- 1:01:02References
- 1:02:56Computation Expressions in F Sharp
