app/django/utils/thread_support.py
author Todd Larsen <tlarsen@google.com>
Wed, 28 Jan 2009 21:01:37 +0000
changeset 1053 3b9552cf748a
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Rename the confusing Tossed Model class to PresenceWithToS. Patch by: Todd Larsen Review by: to-be-reviewed

"""
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"