看看这段代码:asyncio.set_event_loop(loop)return formResponse(True, "mainHandler Started") # Run this without awaiting the task
这是在烧瓶服务器端点上调用的函数的一部分我尝试过调度任务,使用期货,只是运行它,但都没有效果。即使
我使用to_thread和python3.9进行了尝试。 我在异步循环中有阻塞IO (Dash应用程序)。这来自于: Asyncio run Dash (Flask) server with another coroutine concurrently 第一个解决方案有效:只需在异步循环中运行dash应用程序示例将飞行数据收集到曲线图中... # from flask import Flask, jsonify
import asyncio</