Update libjuju
[osm/N2VC.git] / modules / libjuju / juju / client / runner.py
1
2 class AsyncRunner:
3 async def __call__(self, facade_method, *args, **kwargs):
4 await self.connection.rpc(facade_method(*args, **kwargs))
5
6
7 class ThreadedRunner:
8 pass
9
10 # Methods are descriptors??
11 # get is called with params
12 # set gets called with the result?
13 # This could let us fake the protocol we want
14 # while decoupling the protocol from the RPC and the IO/Process context
15
16 # The problem is leaking the runtime impl details to the top levels of the API
17 # with async def By handling the Marshal/Unmarshal side of RPC as a protocol we
18 # can leave the RPC running to a specific delegate without altering the method
19 # signatures. This still isn't quite right though as async is co-op
20 # multitasking and the methods still need to know not to block or they will
21 # pause other execution