[openstack-dev] [oslo] Asyncio and oslo.messaging
Victor Stinner
victor.stinner at enovance.com
Fri Jul 11 09:35:28 UTC 2014
Hi,
Le lundi 7 juillet 2014, 19:18:38 Mark McLoughlin a écrit :
> I'd expect us to add e.g.
>
> @asyncio.coroutine
> def call_async(self, ctxt, method, **kwargs):
> ...
>
> to RPCClient. Perhaps we'd need to add an AsyncRPCClient in a separate
> module and only add the method there - I don't have a good sense of it
> yet.
I don't want to make trollius a mandatory dependency of Oslo Messaging, at
least not right now.
An option is to only declare the method if trollius is installed. "try: import
trollius except ImportError: trollius = None" and then "if trollius is not
None: @trollius.coroutine def cal_async(): ...".
Or maybe a different module (maybe using a subclass) is better.
Victor
More information about the OpenStack-dev
mailing list