A live coding session implementing a custom non-blocking IO backend for the new IO interface in the latest version of the programming language. The author walks through building a minimal TCP server IO implementation from scratch, copying and adapting internal standard library functions for socket creation, bind, listen, accept, read, and write. The motivation is to avoid multi-threaded and async/await concurrency models in favor of a single-threaded, non-blocking, event-loop-driven dispatch using epoll. The session covers navigating private standard library internals, handling E_again/WouldBlock errors, and wiring up an epoll-based event loop to manage multiple connections without concurrency primitives.
•1h 47m watch time
Sort: