Skip to content

Commit 22ad425

Browse files
committed
let's try
1 parent 5457874 commit 22ad425

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reflex/compiler/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def compile_state(state: type[BaseState]) -> dict:
199199
except RuntimeError:
200200
pass
201201
else:
202-
return _sorted_keys(loop.run_until_complete(_resolve_delta(initial_state)))
202+
future = asyncio.run_coroutine_threadsafe(_resolve_delta(initial_state), loop)
203+
return _sorted_keys(future.result())
203204

204205
# Normally the compile runs before any event loop starts, we asyncio.run is available for calling.
205206
return _sorted_keys(asyncio.run(_resolve_delta(initial_state)))

0 commit comments

Comments
 (0)