postrank-labs/goliath

Store env in thread-local variable

singpolyma opened this issue · 1 comments

Using https://ruby-doc.org/core-2.2.0/Thread.html#method-i-thread_variable_get

Currently stored Fibre-local, which is super confusing when my "env" suddenly becomes nil across fibres :P

No, obviously that won't work :P and can't use instance because we don't new up anything per request? Heh, I guess just mostly can't use that env helper in any but the simplest cases. :/