修复串数据问题
This commit is contained in:
7
web.py
7
web.py
@@ -32,12 +32,7 @@ st.set_page_config(
|
|||||||
|
|
||||||
def run_async(coro):
|
def run_async(coro):
|
||||||
"""Run async coroutine in sync context"""
|
"""Run async coroutine in sync context"""
|
||||||
loop = asyncio.new_event_loop()
|
return asyncio.run(coro)
|
||||||
asyncio.set_event_loop(loop)
|
|
||||||
try:
|
|
||||||
return loop.run_until_complete(coro)
|
|
||||||
finally:
|
|
||||||
loop.close()
|
|
||||||
|
|
||||||
|
|
||||||
def safe_rerun():
|
def safe_rerun():
|
||||||
|
|||||||
Reference in New Issue
Block a user