Closed tareksamni closed 5 years ago
I wrote this gem three years ago. IIRC, because I'm using Thread.current
, it's thread local storage, which means that the store is per-thread, so you can't access it from different threads.
Maybe there's a bug here, if you can demonstrate something, please le tme know!
I've reviewed the simple and straight forward implementation of this gem but I could not understand: How come this is a thread safe store?
Uses Rack::BodyProxy, adapted from Rack::Lock's usage of the same pattern.
This is totally good/true except that you do not use anyMutex
s as inRack::Lock
. so how do you manage conccurent / multi-threaded usage of thisMiddleware
?is there any magical usage of the
request_store_active
because you declare, set and clear it but I can't understand where is the value of having this in the thread store!Could @steveklabnik give more details/illustration in the
README.md
?