method: _thread.WorkerPool.dispatch

 return Reply object for the asynchronous dispatch 
            of the given func(*args, **kwargs) in a 
            separate worker thread. 
        
    def dispatch(self, func, *args, **kwargs): 

origin: _thread.WorkerPool

where:

exceptions that might appear during execution:

function source:

def dispatch(self, func, *args, **kwargs): 
    """ return Reply object for the asynchronous dispatch 
            of the given func(*args, **kwargs) in a 
            separate worker thread. 
        """
    if self._shuttingdown: 
        raise IOError("WorkerPool is already shutting down") 
    try: 
        thread, _ = self._ready.popitem() 
    except KeyError: # pop from empty list
        if self.maxthreads and len(self._alive) >= self.maxthreads: 
            raise IOError("can't create more than %d threads." %
                          (self.maxthreads,))
        thread = self._newthread() 
    return thread.send((func, args, kwargs))

call sites:

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.0

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.1

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_io.py

traceback _thread.WorkerPool.dispatch.2

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.3

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.4

called in /home/johnny/projects/merlinux/py/dist/py/test/testing/test_session.py

traceback _thread.WorkerPool.dispatch.5

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.6

called in /home/johnny/projects/merlinux/py/dist/py/test/raises.py

traceback _thread.WorkerPool.dispatch.7

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.8

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.9

called in /home/johnny/projects/merlinux/py/dist/py/thread/testing/test_pool.py

traceback _thread.WorkerPool.dispatch.10