How to use the aiomultiprocess.pool.PoolWorker function in aiomultiprocess

To help you get started, we’ve selected a few aiomultiprocess examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jreese / aiomultiprocess / aiomultiprocess / pool.py View on Github external
def create_worker(self, qid: QueueID) -> Process:
        """Create a worker process attached to the given transmit and receive queues."""
        tx, rx = self.queues[qid]
        process = PoolWorker(
            tx,
            rx,
            self.maxtasksperchild,
            self.childconcurrency,
            initializer=self.initializer,
            initargs=self.initargs,
        )
        process.start()
        return process