Skip to content

Asyncio support

Vincent Michel requested to merge github/fork/vxgmichel/asyncio_support into master

Hi Tiago,

I've been working on the asyncio support for PyTango lately, so you might want to have a look. It seems to work fine from both client and server sides, there is an example here if you want to give it a try. I tried not to change your code as much as possible, except for green.py that I had to refactor.

For the server, I simply had to add a new asyncio executor with an interface similar to your gevent executor. For the client, I tweaked it a bit so that each green mode (Synchronous, Gevent, Futures and Asyncio) have its own executor, submitter and waiter. The waiter is just a function to get the actual result out of the asynchronous result.

I haven't tested the other modes (Futures and Gevent) so I'm not 100% sure I didn't break them. In any case, it shouldn't be more than typos.

I'm really satisfied and excited about the results, it works just as I expected. Let me know what you think of it,

Thanks,

Vincent

Merge request reports