How to use Python Concurrent Futures with decorators [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . I'm using a decorator for the thread pool executor: from functools import wraps from .bounded_pool_executor import BoundedThreadPoolExecutor _DEFAULT_POOL = BoundedThreadPoolExecutor(max_workers=5) def threadpool(f, executor=None): @wraps(f) def wrap(*args, **kwargs): return (executor or _DEFAULT_POOL).submit(f,