gwy15 / async_pool

A simple wrapper of library asyncio providing a multiprocessing-library-like coroutine worker pool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async Pool

image Python Version

A simple wrapper of library asyncio providing a multiprocessing-library-like coroutine worker pool.

Requirements

Python >= 3.6

Usage:

from async_pool import Pool

async def afunc(i):
    return i

args = (1,2,3)
with Pool(4) as pool:
    results = pool.map(afunc, args) # expects any combination of (1,2,3)

About

A simple wrapper of library asyncio providing a multiprocessing-library-like coroutine worker pool.

License:MIT License


Languages

Language:Python 100.0%