src/n/o/notmm-0.4.1/examples/contrib/threaded_multihost/threadlocals.py notmm(Download)
log = logging.getLogger('ThreadLocalMiddleware')
try:
from threading import local
except ImportError:
log.warn('getting threadlocal support from django')
from django.utils._threading_local import local
src/c/o/cocktail-0.3.1/cocktail/modeling.py cocktail(Download)
""" import types from copy import copy, deepcopy from threading import local, Lock, RLock from cocktail.typemapping import TypeMapping _thread_data = local()
def __init__(self):
self.__local = local()
@getter
def _items(self):
items = getattr(self.__local, "items", None)
src/f/l/flioops-HEAD/py/trunk/synch.py flioops(Download)
__all__= ['NestedThreadCounter'] from oop.utils.ctx import NestLevelCounter, contextualize from threading import local, Lock, RLock from inspect import isclass, getmembers import types
been entered but not exited in the context of the current thread. """ counters= local() def getNestCnt(self): return NestedThreadCounter.counters.__dict__[self]
src/p/r/Products.CMFSquidTool-1.5.1/Products/CMFSquidTool/threadinglocal.py Products.CMFSquidTool(Download)
from threading import currentThread, RLock
try:
from threading import local
except ImportError:
class _localbase(object):
__slots__ = '_local__key', '_local__args', '_local__lock'
src/c/o/cocktail-0.3.1/cocktail/persistence/datastore.py cocktail(Download)
@since: July 2008 """ from types import FunctionType from threading import local, Lock from ZODB import DB import transaction from cocktail.modeling import getter
def __init__(self, storage = None):
self._thread_data = local()
self.__storage_lock = Lock()
self.__db = None
self.__storage = None
self.storage = storage
src/u/t/util-HEAD/actor.py util(Download)
import sys from functools import partial from threading import Thread, local from datetime import datetime, timedelta from itertools import takewhile import inspect import Queue class MailBoxLocal(local):
src/r/e/reporter-lib-HEAD/packages/Django/django/db/backends/__init__.py reporter-lib(Download)
import decimal from threading import local from django.db import DEFAULT_DB_ALIAS from django.db.backends import util from django.utils import datetime_safe from django.utils.importlib import import_module class BaseDatabaseWrapper(local):
src/a/r/armstrong-HEAD/trunk/src/django/core/urlresolvers.py armstrong(Download)
""" import re from threading import local from django.http import Http404 from django.conf import settings
# SCRIPT_NAME prefixes for each thread are stored here. If there's no entry for # the current thread (which is the only one we ever access), it is assumed to # be empty. _prefixes = local() # Overridden URLconfs for each thread are stored here. _urlconfs = local()
src/z/3/z3ext-HEAD/Sandbox/fafhrd91/z3ext-dev/z3ext/z3ext.resourcepackage/trunk/src/z3ext/resourcepackage/library.py z3ext(Download)
$Id: library.py 11489 2009-12-05 01:46:06Z fafhrd91 $ """ from threading import local from zope import interface from zope.site.hooks import getSite from zope.traversing.browser import absoluteURL from zope.component import queryUtility, queryAdapter from interfaces import IPackage, ILibrary class IncludesInfo(local):
src/z/3/z3ext-HEAD/Sandbox/fafhrd91/z3ext-dev/z3ext/z3ext.cache/trunk/src/z3ext/cache/default.py z3ext(Download)
$Id: default.py 11599 2010-01-15 15:39:32Z fafhrd91 $ """ from threading import local from zope import component from zope.component import getUtility
class LocalData(local):
keys = ()
cache = noCache
requestvars = ()
_old_values = ((), (), None)
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next