Is it expected that the current thread will be the same across concurrent requests to "free" passenger?
I've got a bug in that thread local ruby variables are not independent to concurrent requests. I.e., the same thread id shows for both of two concurrent requests (simulated with a sleep to slow things down).
Is this different for Passenger enterprise edition?
Is there a proper way to get a thread local variable that is isolated for the life of a single request in Rails?
UPDATED:
- Problem is not specific to Passenger. Problem is there for Thin as well.
- Other libraries, such as paper_trail may have this issue: https://github.com/airblade/paper_trail/issues/499
- Here's a potential fix: https://github.com/steveklabnik/request_store, along with a detailed description of the issue I'm seeing.