• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(160)  |  Call(93)  |  Derive(0)  |  Import(67)
No Document.

        def currentThread():
    try:
        return _active[_get_ident()]
    except KeyError:
        ##print "current_thread(): no current thread for", _get_ident()
        return _DummyThread()
        


src/p/y/pythomnic3k-HEAD/sandbox/dsuch/pmnc-cmdline/lib/interlocked_queue.py   pythomnic3k(Download)
 
    ###################################
 
    from threading import Thread, current_thread
    from time import sleep
    from random import random
 
        def pop(q, t = None):
            go.wait()
            current_thread().result = q.pop(t)
 
        ###############################
 
        th1 = Thread(target = pop, args = (que, ))

src/p/y/pythomnic3k-HEAD/trunk/lib/pmnc/threads.py   pythomnic3k(Download)
 
################################################################################
 
import threading; from threading import Event, Thread, current_thread
try:
    import pythoncom; from pythoncom import CoInitializeEx, CoUninitialize, COINIT_MULTITHREADED
except:
    def run(self):
        current_thread()._request = InfiniteRequest() # has an infinite request attached
        PmncThread.run(self)
 
    def stopped(self, timeout = None):
        if timeout is not None:
            self.__stop.wait(timeout) # this may spend waiting slightly less, but it's ok
        return self.__stop.is_set()
 
    def stop(self):
        self.__stop.set()
        if current_thread() is not self:

src/p/y/pythomnic3k-HEAD/lib/pmnc/threads.py   pythomnic3k(Download)
 
################################################################################
 
import threading; from threading import Event, Thread, current_thread
try:
    import pythoncom; from pythoncom import CoInitializeEx, CoUninitialize, COINIT_MULTITHREADED
except:
    def run(self):
        current_thread()._request = InfiniteRequest() # has an infinite request attached
        PmncThread.run(self)
 
    def stopped(self, timeout = None):
        if timeout is not None:
            self.__stop.wait(timeout) # this may spend waiting slightly less, but it's ok
        return self.__stop.is_set()
 
    def stop(self):
        self.__stop.set()
        if current_thread() is not self:

src/p/y/pythomnic3k-HEAD/trunk/lib/interlocked_queue.py   pythomnic3k(Download)
 
    ###################################
 
    from threading import Thread, current_thread
    from time import sleep
    from random import random
 
        def pop(q, t = None):
            go.wait()
            current_thread().result = q.pop(t)
 
        ###############################
 
        th1 = Thread(target = pop, args = (que, ))

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/multiprocessing/pool.py   ironruby(Download)
    def _handle_tasks(taskqueue, put, outqueue, pool):
        thread = threading.current_thread()
 
        for taskseq, set_length in iter(taskqueue.get, None):
            i = -1
            for i, task in enumerate(taskseq):
                if thread._state:
    def _handle_results(outqueue, get, cache):
        thread = threading.current_thread()
 
        while 1:
            try:
                task = get()
            except (IOError, EOFError):

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/multiprocessing/pool.py   ironruby(Download)
    def _handle_tasks(taskqueue, put, outqueue, pool):
        thread = threading.current_thread()
 
        for taskseq, set_length in iter(taskqueue.get, None):
            i = -1
            for i, task in enumerate(taskseq):
                if thread._state:
    def _handle_results(outqueue, get, cache):
        thread = threading.current_thread()
 
        while 1:
            try:
                task = get()
            except (IOError, EOFError):

src/p/y/pythomnic3k-HEAD/lib/interlocked_queue.py   pythomnic3k(Download)
 
    ###################################
 
    from threading import Thread, current_thread
    from time import sleep
    from random import random
 
        def pop(q, t = None):
            go.wait()
            current_thread().result = q.pop(t)
 
        ###############################
 
        th1 = Thread(target = pop, args = (que, ))

src/p/i/pida-0.6.2/pida-plugins/python_debugger/rpdb2.py   pida(Download)
def current_thread():
    try:
        if is_py3k():
            return threading.current_thread()
 
    except AttributeError:
        pass

src/p/y/pythomnic3k-1.1/lib/interlocked_queue.py   Pythomnic3k(Download)
 
    ###################################
 
    from threading import Thread, current_thread
    from time import sleep
    from random import random
 
        def pop(q, t = None):
            go.wait()
            current_thread().result = q.pop(t)
 
        ###############################
 
        th1 = Thread(target = pop, args = (que, ))

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/multiprocessing/managers.py   ironruby(Download)
    def accept_connection(self, c, name):
        '''
        Spawn a new thread to serve this connection
        '''
        threading.current_thread().name = name
        c.send(('#RETURN', None))
        self.serve_client(c)

  1 | 2 | 3 | 4 | 5 | 6 | 7  Next