You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'v found your port of TokenBucket algorithm interesting (even that in the end i'v used another\simpler implementation).
Just one thing i'v noticed. Locks in the TokenBucket base class are too broad because "locker object" is defined as static while protecting instance (not static) state. If more instances will be used in the single app, they would be racing for that single lock for no reason.
HTH
The text was updated successfully, but these errors were encountered:
Hey
I'v found your port of TokenBucket algorithm interesting (even that in the end i'v used another\simpler implementation).
Just one thing i'v noticed. Locks in the TokenBucket base class are too broad because "locker object" is defined as static while protecting instance (not static) state. If more instances will be used in the single app, they would be racing for that single lock for no reason.
HTH
The text was updated successfully, but these errors were encountered: