Open thedrow opened 5 years ago
I'm interested in hearing more about what would be required for this.
Well we'd need to rewrite your socket code to use AnyIO. You just have to specify which backend you want to use. See the documentation for details.
Oh ok I don't know that sounds like a lot changes. Let me make an alternative suggestion.
I've designed the library to be extended like this the best I could. Instead of doing that rewrite, you should be able to make your own BaseMessageBus implementation using that backend. This is basically just the message bus without any socket stuff.
That abstraction isn't perfect and there's a lot of opportunity to improve it to make it easier to use.
I would accept a new implementation of BaseMessageBus for AnyIO into the project.
If I can give my 2 cent... asyncio is in the standard library anyio is not...
It'd be useful for those who use trio instead of asyncio if this library supported both. AnyIO is a library which provides an abstraction over different event loop implementations. Would you accept a patch that uses it instead of plain asyncio?