Closed smurfix closed 6 years ago
You could use trio.TaskLocal
for now
Actually, I already do. The problem is that for now I need to switch that to a RunLocal, because otherwise subtasks won't see the global event loop.
Wait, why is there a global event loop? :-)
Resolved in f865772 by switching back to a TaskLocal, and monkey-patching asyncio.
Multiple loops per Trio run requires contextvars support. That library is new in Python 3.7. There's no backport to 3.6 or 3.5 yet.