Go singleflight: Cancellation and Shutdown
Learn how Go singleflight prevents cache stampedes, why caller cancellation gets tricky, and how to safely cancel and drain shared work during shutdown.
2 articles
Learn how Go singleflight prevents cache stampedes, why caller cancellation gets tricky, and how to safely cancel and drain shared work during shutdown.
How hierarchical timing wheels expire millions of cache entries efficiently in Go without periodic O(n) scans or a timer per key.