trio-asyncio
trio-asyncio copied to clipboard
Check loop context
Now that we have contextvar support, add one that remembers whether we're currently in an asyncio or a Trio context.
This shall catch erroneous nested calls of run_asyncio and run_trio. Missing calls to these might be possible but needs to be invesigated further.
Update: use sniffio to do that