def run_sync_in_thread(coro: Coroutine[Any, Any, T]) -> T
Run a coroutine synchronously in a new thread.This function creates a new thread with its own event loop to run the coroutine.
Context variables are properly propagated between threads.
This is useful when you need to run async code in a context where you can’t use
the current event loop (e.g., inside an async frame).Example: