4 ms·
It could be done with anything, but async view lets other code execute while it is waiting for IO, what does waitUntilResolved do?
by nurettin 6y ago
It could be done with anything, but async view lets other code execute while it is waiting for IO, what does waitUntilResolved do?
- FreeHugs 6y agowaitUntilResolved() would wait until the promises are resolved and of course let other code execute meanwhile.
- nurettin 6y agoThat's an awesome function. Is it multiprocess?
- FreeHugs 6y agoIt was pseudocode. If a function like this exists, it would just sleep until the given promises are resolved. I don't see how that is realted to the term "multiprocess".
- nurettin 6y agoWell I don't really see how it can exist, do non-blocking io and wait for promises while performing a sleep. So the only way left is multiprocess.
- macNchz 6y agoIt sounds like your waitUntilResolved() function is effectively asyncio.gather(), which due to the nature of Python’s async implementation is not something that could be used in a Django view prior to this release.