From f6a0037f8d9ef65bca02f84cc41c1b8d2097e285 Mon Sep 17 00:00:00 2001 From: FrankWang Date: Wed, 8 Jul 2015 21:00:46 +0800 Subject: [PATCH] Fix thread pool high cpu usage. --- telebot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 431f73c..ad3ad1d 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -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)