Lifetime of Thread object?


#1

Does anyone have a good description of how long a given Thread lives
in the context of a request to a RoR application? Specifically:

  • Do I know that a given request only uses one Thread? (unless I
    explicitly fork another one in my code)

  • Do I know that a given Thread only lasts for one request?

  • If I cram some data into Thread.current early-on in processing the
    request, do I know that this data will be available to objects later
    in the request, and the data won’t be available to (or overwritten
    by) another request?

-faisal