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
Thanks for opening this issue. This is left over from the original implementation. Originally, memory storage was the only available backend. There's no shared counter between processes when using memory storage.
@lsimoneau, even though that was authored a little over a year ago, thoughts/recommendation on the Redis backend's thread-safety without the use of Thread.exclusive?
Hey, so it's a little vague since it's been so long, but looking back over my commits, I didn't pay any attention to the Thread.exclusive, I just abstracted out the business of the in-memory storage and then wrote the Redis one to conform to the same interface.
Hi,
I looked through the code and I wonder why do you use
Thread.exclusive
when dealing with the counter?My first concern is that Redis itself has awesome atomic operations like
INCR
,SETNX
and others. Calls to Redis does not require any critical section.My second concern is that if
Thread.exclusive
was added for the sake of memory storage, then how do you share limit counter between processes?Thanks,
Daniel.
The text was updated successfully, but these errors were encountered: