Port synapse.replication.tcp to async/await#6666
Conversation
richvdh
left a comment
There was a problem hiding this comment.
so i think this works, however...
the on_foo methods, and subscribe_to_stream, are called from on_FOO methods, which are documented to return Deferreds.
I think you're getting away with it because this means that they are returning a Coroutine, and the thing calling them does a run_as_background_process on them so is happy with that... but to be correct that code path needs some documentation updates at least.
|
Yeah, agreed. I could have just documented the functions as returning |
There was a problem hiding this comment.
this one isn't called the same way
synapse/replication/tcp/protocol.py
Outdated
|
|
||
| @abc.abstractmethod | ||
| def on_sync(self, data): | ||
| async def on_sync(self, data): |
There was a problem hiding this comment.
the implementations of this don't seem to be async (and it's not awaited where it is called).
|
Honestly its like I can't even tell the difference between ALL CAPS and lower case... |
* commit '48c3a9688': Port synapse.replication.tcp to async/await (#6666)
No description provided.