Hi,

Some more questions still:

It seems a worker uses the exact same thread to handle each request.

Is that guaranteed to happen for the lifetime of a worker? Or are
there cases where a unicorn worker might spin a new thread to handle
the next requests?

If the same thread is always used, isn't that a potential issue when
programmers use thread local variables, which are not reset at the
next request?  (I know, the usage of thread local variables is not
recommended, but take a random rails project, go into their $GEM_HOME
and do grep -r Thread.current . , see what I mean..)


Cheers,
Jimmy



On Sat, Jan 8, 2011 at 4:54 PM, Jimmy Soho <[email protected]> wrote:
>>>> However, the Thread.current value within those parallel requests is
>>>> always the same.
>
> EW> Just a lucky coincidence :)
>
> I guess. Got confused there for a moment because of it. :)  Using $$
> made things more clear.
>
>
>
> Thanks
>
> Jimmy
>
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to