pyrate_limiter.buckets.mp_bucket module¶
multiprocessing In-memory Bucket using a multiprocessing.Manager.ListProxy and a multiprocessing.Lock.
- class pyrate_limiter.buckets.mp_bucket.MultiprocessBucket(rates, items, mp_lock)¶
Bases:
InMemoryBucket- classmethod init(rates)¶
Creates a single ListProxy so that this bucket can be shared across multiple processes.
- items¶
- limiter_lock()¶
An additional lock to be used by Limiter in-front of the thread lock. Intended for multiprocessing environments where a thread lock is insufficient.
- mp_lock¶