Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-253

Thread local storage only lasts for life of a request.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.1
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      The mod_python code creates a fresh Python thread state object for every request, with it being destroyed at end of the request. This thread state object is where thread local storage is kept. As a result, thread local storage isn't really thread local storage and is instead request local storage for that thread. This can be detrimental to performance for any web framework which relies on being able to cache stuff in thread local storage for use at any time in life time of the process. Worst case will see that data being recreated on every request, which could cause excessive overhead on process/application if creating the data is time consuming.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              grahamd Graham Phillip Dumpleton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: