Add async variant of InstallationProxyService
#1193
alex-opeykin
started this conversation in
Ideas
Replies: 1 comment
-
In general, the move to asyncio is much more preferred. However, the code duplication this implementation creates can lead to unmaintable code. We plan to refactor the whole project to asyncio one day - which we'll be a major version bump. So, either wait for this to happen which won't be any time soon, or create a PR that refactors the whole lockdown services implementation to be pure asyncio. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great to add an asynchronous implementation for the install, uninstall application methods in the InstallationProxyService.
Unfortunately, I haven't found it. But I see that there are already async methods in
ServiceConnection
that will help to do this.I could try to add such a thing myself, but I'm afraid my solution won't be very clean)
While searching for a solution, I realized that when we poll connected devices in async_get_tunneld_devices, we call await rsd.connect(). And in
RemoteServiceDiscoveryService
,async def connect
uses synchronousstart_lockdown_service
, which does not callservice.aio_start()
. Can we safely replace synchronousstart_lockdown_service
in connect method withaio_start_lockdown_service?
Beta Was this translation helpful? Give feedback.
All reactions