pttman
Muster
屬於你的大爆卦
pttman
Muster
屬於你的大爆卦
pttman
Muster
屬於你的大爆卦
Ptt 大爆卦
Async_to_sync
離開本站
你即將離開本站
並前往
https://zhuanlan.zhihu.com/p/43102770
django使用channels实现websocket通知 - 知乎专栏
要从同步环境发送事件,则必须使用通道层中 asgiref.sync.async_to_sync 指定的包装器。因为我是在views.py中调用该函数,是同步的环境。
確定!
回上一頁
查詢
「Async_to_sync」
的人也找了:
//=$keyword?>
Asgiref
You cannot call this from an async context - use a thread or sync_to_async
Django async
Django async task
Django ASGI
Django asyncio
Django thread
Daphne Django