bitbake: bitbake: asyncrpc: Defer all asyncio to child process

Reworks the async I/O API so that the async loop is only created in the
child process. This requires deferring the creation of the server until
the child process and a queue to transfer the bound address back to the
parent process

(Bitbake rev: 8555869cde39f9e9a9ced5a3e5788209640f6d50)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
[small loop -> self.loop fix in serv.py]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt authored and Richard Purdie committed 2021-08-23 08:30:54 +01:00
1 parent e8182a794d
commit fdc908f321
2 files changed
+72 -46

No files matched your search

+2 -2
View File
@@ -410,11 +410,11 @@ class ServerClient(bb.asyncrpc.AsyncServerConnection):
class Server(bb.asyncrpc.AsyncServer):
def __init__(self, db, loop=None, upstream=None, read_only=False):
def __init__(self, db, upstream=None, read_only=False):
if upstream and read_only:
raise bb.asyncrpc.ServerError("Read-only hashserv cannot pull from an upstream server")
super().__init__(logger, loop)
super().__init__(logger)
self.request_stats = Stats()
self.db = db