python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio
Other
188 stars 37 forks source link

Change adaptation #36

Closed smurfix closed 6 years ago

smurfix commented 6 years ago

Currently, the trio2aio and aio2trio adapters are pretty basic while run_asyncio creates a magic object and run_trio returns an asyncio.Future, requiring specialized adapters for generators and iterators. That's an unnecessary cognitive load and prone to errors, esp. as run_asyncio does more than trio2aio, which seems counter-intuitive.

smurfix commented 6 years ago

aio_as_trio it is.

Patch(es) in https://github.com/python-trio/trio-asyncio/pull/38