app/django/utils/thread_support.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 06 Dec 2008 14:46:19 +0000
changeset 684 896672e44e03
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Fix for randomely ocurring bug The bug and it's fix are described by the first comment from Guido in http://code.google.com/p/googleappengine/issues/detail?id=772. Patch by: Guido van Rossum

"""
Code used in a couple of places to work with the current thread's environment.
Current users include i18n and request prefix handling.
"""

try:
    import threading
    currentThread = threading.currentThread
except ImportError:
    def currentThread():
        return "no threading"