hi! call_soon_threadsafe
has supported a contextvars.Context
argument since PEP 567. adding an explicit context
parameter to run_coroutine_threadsafe
would be convenient and (it appears) easy to do.
note that run_coroutine_threadsafe
already uses the current context, so context.run(run_coroutine_threadsafe, ...)
works as an alternative right now. i had to read a little Lib/asyncio
source to verify this though—i don’t believe it’s documented. having an explicit parameter would clarify this.