X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2Fjuju%2Fclient%2Frunner.py;fp=modules%2Flibjuju%2Fjuju%2Fclient%2Frunner.py;h=6545bc413eada7bb8007d04f634deb51ba8564e3;hp=61f2963361fb9b42e1b629490879d843cc684fd6;hb=1a15d1c84fc826fa7996c1c9d221a324edd33432;hpb=fd577a36aaf408c845f3bb8b3f28ecbbf3332107 diff --git a/modules/libjuju/juju/client/runner.py b/modules/libjuju/juju/client/runner.py index 61f2963..6545bc4 100644 --- a/modules/libjuju/juju/client/runner.py +++ b/modules/libjuju/juju/client/runner.py @@ -1,6 +1,4 @@ - - class AsyncRunner: async def __call__(self, facade_method, *args, **kwargs): await self.connection.rpc(facade_method(*args, **kwargs)) @@ -15,14 +13,9 @@ class ThreadedRunner: # This could let us fake the protocol we want # while decoupling the protocol from the RPC and the IO/Process context -# The problem is leaking the runtime impl details to the top levels of the API with -# async def -# By handling the Marshal/Unmarshal side of RPC as a protocol we can leave the RPC running to a specific -# delegate without altering the method signatures. -# This still isn't quite right though as async is co-op multitasking and the methods still need to know -# not to block or they will pause other execution - - - - - +# The problem is leaking the runtime impl details to the top levels of the API +# with async def By handling the Marshal/Unmarshal side of RPC as a protocol we +# can leave the RPC running to a specific delegate without altering the method +# signatures. This still isn't quite right though as async is co-op +# multitasking and the methods still need to know not to block or they will +# pause other execution