Skip to content

Commit

Permalink
Disable setting thread_name_prefix in ThreadPoolExecutor (only suppor…
Browse files Browse the repository at this point in the history
…ted in Python >= 3.6)
  • Loading branch information
xmikos committed Mar 24, 2017
1 parent 5c3a83f commit f95aa5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion soapypower/threadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
class ThreadPoolExecutor(concurrent.futures.ThreadPoolExecutor):
"""ThreadPoolExecutor which allows setting max. work queue size"""
def __init__(self, max_workers=0, thread_name_prefix='', max_queue_size=0):
super().__init__(max_workers or os.cpu_count() or 1, thread_name_prefix)
#super().__init__(max_workers or os.cpu_count() or 1, thread_name_prefix)
super().__init__(max_workers or os.cpu_count() or 1)
self.max_queue_size = max_queue_size or self._max_workers * 10
if self.max_queue_size > 0:
self._work_queue = queue.Queue(self.max_queue_size)
Expand Down

0 comments on commit f95aa5b

Please sign in to comment.