[gentoo-portage-dev] [PATCH 2/2] AsynchronousTask: add async_wait() method (bug 653856)

2018-04-23 Thread 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

[gentoo-portage-dev] [PATCH 1/2] AsynchronousTask: add scheduler attribute (bug 653856)

2018-04-23 Thread Zac Medico
Add an AsynchronousTask.scheduler attribute, which will hold an event loop instance in order to work with Future instances. Name the attribute "scheduler" because this is the name used by many existing subclasses of AsynchronousTask. Since the AsyncScheduler class already has an _event_loop

[gentoo-portage-dev] [PATCH 0/2] AsynchronousTask: add async_wait() method (bug 653856)

2018-04-23 Thread 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

Re: [gentoo-portage-dev] [PATCH 0/5] EbuildFetcher._get_uri_map(): fix event loop recursion (bug 653810)

2018-04-23 Thread Zac Medico
On 04/23/2018 09:10 AM, Brian Dolbec wrote: > On Sun, 22 Apr 2018 15:30:09 -0700 > Zac Medico wrote: > >> Bug: https://bugs.gentoo.org/653810 >> >> Zac Medico (5): >> portdbapi: add async_fetch_map method (bug 653810) >> EbuildFetcher: inherit CompositeTask (bug 653810)

Re: [gentoo-portage-dev] [PATCH 0/5] EbuildFetcher._get_uri_map(): fix event loop recursion (bug 653810)

2018-04-23 Thread Brian Dolbec
On Sun, 22 Apr 2018 15:30:09 -0700 Zac Medico wrote: > Bug: https://bugs.gentoo.org/653810 > > Zac Medico (5): > portdbapi: add async_fetch_map method (bug 653810) > EbuildFetcher: inherit CompositeTask (bug 653810) > EbuildFetcher: add _async_uri_map method (bug