def getThreadCount(self):

        """Return the number of threads in the pool."""
        
        self.__resizeLock.acquire()
        try:
            return len(self.__threads)
        finally:
            self.__resizeLock.release()
Return the number of threads in the pool.
recipes/Python/203871_generic_programming_thread/recipe-203871.py