commit:     c984e65e743d049c715f66e96bacb4e830922a34
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 29 03:52:18 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr 29 03:52:18 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c984e65e

AsynchronousTask._async_wait: asyncio compat (bug 653856)

Use call_soon for asyncio compatibility.

Bug: https://bugs.gentoo.org/653856

 pym/_emerge/AsynchronousTask.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/pym/_emerge/AsynchronousTask.py b/pym/_emerge/AsynchronousTask.py
index 4e664d00e..9d8df7f5e 100644
--- a/pym/_emerge/AsynchronousTask.py
+++ b/pym/_emerge/AsynchronousTask.py
@@ -94,11 +94,7 @@ class AsynchronousTask(SlotObject):
                loop recursion (or stack overflow) that synchronous calling of
                exit listeners can cause. This method is thread-safe.
                """
-               self.scheduler.idle_add(self._async_wait_cb)
-
-       def _async_wait_cb(self):
-               self.wait()
-               return False
+               self.scheduler.call_soon(self.wait)
 
        def cancel(self):
                """

Reply via email to