Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH 0/2] AsynchronousTask: add async_wait() method (bug 653856)
Date: Tue, 24 Apr 2018 03:21:19
Message-Id: 20180424032109.16691-1-zmedico@gentoo.org
1 Since the AsynchronousTask.wait() method is prone to event loop
2 recursion, deprecate it, and add an async_wait() method method to
3 replace it. Instead of using task.wait() in order to implicitly run
4 the event loop, now loop.run_until_complete(task.async_wait()) will
5 be used to explicitly run the event loop. This explicit approach will
6 make it more obvious when code will trigger event loop recursion
7 which would not be compatible with asyncio's default event loop.
8
9 Bug: https://bugs.gentoo.org/653856
10
11 Zac Medico (2):
12 AsynchronousTask: add scheduler attribute (bug 653856)
13 AsynchronousTask: add async_wait() method (bug 653856)
14
15 pym/_emerge/AbstractPollTask.py | 3 +--
16 pym/_emerge/AsynchronousLock.py | 2 +-
17 pym/_emerge/AsynchronousTask.py | 25 ++++++++++++++++++++++++-
18 pym/_emerge/CompositeTask.py | 2 +-
19 pym/portage/tests/ebuild/test_ipc_daemon.py | 2 +-
20 pym/portage/util/SlotObject.py | 9 ++++++++-
21 pym/portage/util/_async/AsyncScheduler.py | 7 +++++++
22 pym/portage/util/_async/AsyncTaskFuture.py | 2 +-
23 8 files changed, 44 insertions(+), 8 deletions(-)
24
25 --
26 2.13.6

Replies