drf不支持啊,
When running in a mode that does not match the view (e.g. an async view under
WSGI, or a traditional sync view under ASGI), Django must emulate the other
call style to allow your code to run. This context-switch causes a small
performance penalty of around a millisecond.
继承 APIView 的方法,发现每个请求都是单独的 event loop ,
wait task 318760 future data, future: 140251998671568, loop:140251997385056
set task 318760 future data, future: 140251998671568, loop:140251997385056
wait task 318762 future data, future: 140251998681952, loop:140251998919920
set task 318761 future data, future: 140251997477472, loop:140251997378624
【 在 Madlee 的大作中提到: 】
: django不是自带香奈儿吗?也可以异步运行啊。
--
修改:iwannabe FROM 119.139.197.*
FROM 119.139.197.*