Skip to content

Commit 38d62e1

Browse files
committed
Use RunLocal, not TaskLocal
otherwise subtasks won't see the main event loop
1 parent 6af51a3 commit 38d62e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

trio_asyncio/loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class _TrioPolicy(asyncio.events.BaseDefaultEventLoopPolicy):
3535

3636
def __init__(self):
3737
super().__init__()
38-
self._trio_local = trio.TaskLocal(_loop=None, _task=False)
38+
self._trio_local = trio.RunLocal(_loop=None, _task=False)
3939

4040
def new_event_loop(self):
4141
try:

0 commit comments

Comments
 (0)