mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-06 10:17:34 +00:00
To use `reactor.callFromThread` we need to take the GIL. However, the vast majority of use-cases on the Rust side involve using that from Tokio reactor threads, where we do not want to take the GIL (as it can potentially block for a long time). In #20252 we added a pure Rust alternative to `callFromThread`. `run_python_awaitable` is the last usage of `callFromThread`, and so we replace it with `dispatch_to_twisted`. --- The diff is a lot smaller if you hide pure whitespace changes. --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>