def __init__(self, channel, nworkers = None):
        """
        \param channel is a Channel endpoint (fileno/recv/close
        methods expected)
        \param nworkers (integer) number of threads in the pool able
        to process the transaction requests, or None when threads have
        to be created on demand
        """
        ReceiverThread.__init__(self, channel)
        self.__nworkers = nworkers
        self.__lock     = threading.Lock()
        if nworkers is not None:
            self.__workers = []
            self.__workq   = Queue.Queue()
            for idworker in range(nworkers):
                thr = threading.Thread(target=self._pool_work)
                self.__workers.append(thr)
                thr.start()
        else:
            self.__workers = dict()

        \param channel is a Channel endpoint (fileno/recv/close
        methods expected)
        \param nworkers (integer) number of threads in the pool able
        to process the transaction requests, or None when threads have
        to be created on demand
        
recipes/Python/576520_Multithreaded_MultiplexerDemultiplexer_allow/recipe-576520.py