Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: Zac Medico <zmedico@g.o>, gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: [PATCH] Use default asyncio event loop implementation in API consumer threads
Date: Sun, 06 Dec 2020 11:38:46
Message-Id: 9faaaa76-3198-9509-6793-04b630b8a52d@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] Use default asyncio event loop implementation in API consumer threads by Zac Medico
1 On 12/6/20 1:46 AM, Zac Medico wrote:
2 > Make the _safe_loop function an alias for the global_event_loop
3 > function, so that the default asyncio event loop implementation
4 > will be used in API consumer threads. This is possible because
5 > global_event_loop has been fixed (bug 758740) to always use
6 > AsyncioEventLoop, and that uses asyncio.get_event_loop() which
7 > returns a new event loop for each thread.
8
9 I think we may still need a separate _safe_loop function here,
10 since global_event_loop returns a separate loop per pid, but
11 _safe_loop needs to return a separate loop per thread.
12 --
13 Thanks,
14 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature