What is Async and When Should I Use It
summary
Explains Async using Tornado and a working long‑polling chat demo that actually forwards messages and scales without one thread per connection, using a single event loop that registers fd callbacks and blocks only in poll. Shows why sleeping blocks the whole loop, why async cuts per‑connection memory so servers hold tens or hundreds of thousands of idle sockets, and how generator coroutines (gen + yield) restore stack‑like code flow so nonblocking IO feels like normal code.
AI-written summary · about
chapters (7)
- 0:00Start
- 4:51Service-Oriented Architecture
- 5:02Web Sockets
- 6:35Ajax Request
- 28:19What Does Running the Callback Entail
- 40:32Generators
- 42:05Inline Callbacks
related talks
25mAsynchrony: Under the Hood
42mBeyond Promises: Async Patterns in JavaScript
32mThe Evolution Of Asynchronous Javascript
38mIvan Tulup. Async mess in JS under the hood
16mThe Event Loop
46mAsynchronous JavaScript and non-concurrency
43mAvoid the headaches – make your asynchronous code look synchronous!
23mAsync JS
