EvoRM / src /ThreadPoolExecutor.py
eduzrh's picture
Upload src/ThreadPoolExecutor.py with huggingface_hub
1442bae verified
Raw
History Blame Contribute Delete
293 Bytes
import queue
from concurrent.futures import ThreadPoolExecutor
class ThreadPoolExecutor(ThreadPoolExecutor):
def __init__(self, max_workers=None, thread_name_prefix=''):
super().__init__(max_workers, thread_name_prefix)
self._work_queue = queue.Queue(self._max_workers)