4 ms·
> so not sure mixing async code with sync code will behave. I believe there are safeguards in place to be sure you don't accidentally do this.
by collinmanderson 7y ago
> so not sure mixing async code with sync code will behave.
I believe there are safeguards in place to be sure you don't accidentally do this.
- dragonsh 7y agoIt will trigger an error to review the code. It still is bit of a trouble to debug async code with sync code. "Note that as a side-effect of this change, Django is now aware of asynchronous event loops and will block you calling code marked as “async unsafe” - such as ORM operations - from an asynchronous context. If you were using Django from async code before, this may trigger if you were doing it incorrectly. If you see a SynchronousOnlyOperation error, then closely examine your code and move any database operations to be in a synchronous child thread."