We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d900f06 commit dbca4daCopy full SHA for dbca4da
supertokens_python/async_to_sync_wrapper.py
@@ -25,11 +25,11 @@ def check_event_loop():
25
except RuntimeError as ex:
26
if "There is no current event loop in thread" in str(ex):
27
loop = asyncio.new_event_loop()
28
+ nest_asyncio.apply(loop) # type: ignore
29
asyncio.set_event_loop(loop)
30
31
32
def sync(co: Coroutine[Any, Any, _T]) -> _T:
33
check_event_loop()
34
loop = asyncio.get_event_loop()
- nest_asyncio.apply(loop) # type: ignore
35
return loop.run_until_complete(co)
0 commit comments