Chan Chan Chan T: A Generic Tale
summary
Five concurrent websocket connections (example uses five players) start as a fragile system held by a single mutex and leaking memory and cancellation races; replacing shared maps with channels of channels yields immediate pair notifications, concurrency and cancellation via contexts, and a single method to call for matching. Moving the match ID into parametric code avoids an import cycle; type parameters keep the API modular for tests and make the final random-matchmaking service simple, efficient and dependency-free.
AI-written summary · about
related talks
36mConcurrent ML - The One That Got Away
31mGo: Code that Grows with Grace
03h 29mConcurrency with Clojure
08mPërvoja personale me Go si gjuhë e infrastrukturës
54mDesigning for Concurrency Using Message Passing in C++
01h 04mcore.async: Concurrency without Callbacks
44mConcurrency in Scala and on the JVM
01h 16mDesigning for C++ Concurrency Using Message Passing
