meejah / txtorcon

Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/
MIT License
250 stars 72 forks source link

Consider using txaio #135

Closed meejah closed 6 years ago

meejah commented 9 years ago

If I converted all existing Deferred-using code to use txaio instead, then we would support asyncio as well, which might be useful.

sambuddhabasu commented 8 years ago

Hello @meejah , I saw that twisted works with python2 and asyncio works with python3, so, it will be a good idea to use txaio(and internally use twisted/asyncio). However, I'm not sure how to start converting the existing code to txaio. I checked the walkthrough and examples directories but they use txtorcon(twisted internally), so, porting them to txaio seems difficult. It will be really helpful if you can link some resources that will help me understand this.

meejah commented 8 years ago

Twisted also works with Python3 (and so does txtorcon).

Have you read the txaio documentation? Do you have a specific question? The idea would be to replace all event-based calls with the txaio equivalents.

meejah commented 6 years ago

There is now other ways to interop between twisted and asyncio libraries, so I'm not sure there's a need for this, really. Also, it would be complicated by the fact that we do use @inlineCallbacks extensively (and txaio doesn't support this).