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 5457874 commit 22ad425Copy full SHA for 22ad425
reflex/compiler/utils.py
@@ -199,7 +199,8 @@ def compile_state(state: type[BaseState]) -> dict:
199
except RuntimeError:
200
pass
201
else:
202
- return _sorted_keys(loop.run_until_complete(_resolve_delta(initial_state)))
+ future = asyncio.run_coroutine_threadsafe(_resolve_delta(initial_state), loop)
203
+ return _sorted_keys(future.result())
204
205
# Normally the compile runs before any event loop starts, we asyncio.run is available for calling.
206
return _sorted_keys(asyncio.run(_resolve_delta(initial_state)))
0 commit comments