public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH 0/2] AsynchronousTask: add async_wait() method (bug 653856)
@ 2018-04-24  3:21 99% Zac Medico
  0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2018-04-24  3:21 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

Since the AsynchronousTask.wait() method is prone to event loop
recursion, deprecate it, and add an async_wait() method method to
replace it. Instead of using task.wait() in order to implicitly run
the event loop, now loop.run_until_complete(task.async_wait()) will
be used to explicitly run the event loop. This explicit approach will
make it more obvious when code will trigger event loop recursion
which would not be compatible with asyncio's default event loop.

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

Zac Medico (2):
  AsynchronousTask: add scheduler attribute (bug 653856)
  AsynchronousTask: add async_wait() method (bug 653856)

 pym/_emerge/AbstractPollTask.py             |  3 +--
 pym/_emerge/AsynchronousLock.py             |  2 +-
 pym/_emerge/AsynchronousTask.py             | 25 ++++++++++++++++++++++++-
 pym/_emerge/CompositeTask.py                |  2 +-
 pym/portage/tests/ebuild/test_ipc_daemon.py |  2 +-
 pym/portage/util/SlotObject.py              |  9 ++++++++-
 pym/portage/util/_async/AsyncScheduler.py   |  7 +++++++
 pym/portage/util/_async/AsyncTaskFuture.py  |  2 +-
 8 files changed, 44 insertions(+), 8 deletions(-)

-- 
2.13.6



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-04-24  3:21 99% [gentoo-portage-dev] [PATCH 0/2] AsynchronousTask: add async_wait() method (bug 653856) Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox