Did I find the right examples for you? yes no

All Samples(29)  |  Call(0)  |  Derive(0)  |  Import(29)
Drop-in replacement for the thread module.

Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.

Suggested usage is::

    try:
        import _thread
    except ImportError:(more...)

src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/dummy_threading.py   TrustRouter(Download)
from sys import modules as sys_modules
 
import _dummy_thread
 
# Declaring now so as to not have to nest ``try``s to get proper clean-up.

src/h/u/hue-HEAD/desktop/core/ext-py/Mako-0.8.1/mako/compat.py   hue(Download)
    import dummy_threading as threading
    if py3k:
        import _dummy_thread as thread
    else:
        import dummy_thread as thread

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/tempfile.py   ironpython3(Download)
    import _thread
except ImportError:
    import _dummy_thread as _thread
_allocate_lock = _thread.allocate_lock
 

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/dummy_threading.py   ironpython3(Download)
from sys import modules as sys_modules
 
import _dummy_thread
 
# Declaring now so as to not have to nest ``try``s to get proper clean-up.

src/l/u/LuoYunCloud-HEAD/lyweb/lib/Mako-0.8.1/mako/compat.py   LuoYunCloud(Download)
    import dummy_threading as threading
    if py3k:
        import _dummy_thread as thread
    else:
        import dummy_thread as thread

src/s/o/Source.Python-HEAD/addons/source-python/Python3/dummy_threading.py   Source.Python(Download)
from sys import modules as sys_modules
 
import _dummy_thread
 
# Declaring now so as to not have to nest ``try``s to get proper clean-up.

src/w/e/web2py-python3-HEAD/gluon/contrib/gateways/fcgi.py   web2py-python3(Download)
    thread_available = True
except ImportError:
    import _dummy_thread as thread
    import dummy_threading as threading
    thread_available = False

src/c/p/cpython-HEAD/Lib/tempfile.py   cpython(Download)
    import _thread
except ImportError:
    import _dummy_thread as _thread
_allocate_lock = _thread.allocate_lock
 

src/c/p/cpython-HEAD/Lib/dummy_threading.py   cpython(Download)
from sys import modules as sys_modules
 
import _dummy_thread
 
# Declaring now so as to not have to nest ``try``s to get proper clean-up.

src/h/e/headphones-HEAD/lib/mako/compat.py   headphones(Download)
    import dummy_threading as threading
    if py3k:
        import _dummy_thread as thread
    else:
        import dummy_thread as thread

  1 | 2 | 3  Next