1
0
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:
FrankWang 2015-07-08 21:00:46 +08:00
parent 3a574b4596
commit f6a0037f8d

View File

@ -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)