Grokking Concurrency in Python
0% completed
A Rate Limiter Shared by Threads
no lock granted 40126 of 10000 permits, -1.0 tokens left
A token bucket held 10,000 permits and refilled very slowly. On the free-threaded build, it granted 40,126 to sixteen threads. The same class granted exactly 10,000 on the standard build. The race existed on both builds, but only one build made it visible in this run.
The Problem
Rate Limiting introduced the token bucket: a count of permits that refills at a fixed rate up to a maximum, called the capacity
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%