mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix thread pool high cpu usage.
This commit is contained in:
parent
3a574b4596
commit
f6a0037f8d
@ -35,7 +35,7 @@ class ThreadPool:
|
||||
def run(self):
|
||||
while self._running:
|
||||
try:
|
||||
task, args, kwargs = self.queue.get(False)
|
||||
task, args, kwargs = self.queue.get()
|
||||
task(*args, **kwargs)
|
||||
except Queue.Empty:
|
||||
time.sleep(0)
|
||||
|
Loading…
Reference in New Issue
Block a user