4 ms·
Back in the days before async/await, twisted (an asynchronous I/O framework) used these to emulate async/await -- you could yield a differed value (like a promi
by tomn 4y ago
Back in the days before async/await, twisted (an asynchronous I/O framework) used these to emulate async/await -- you could yield a differed value (like a promise/future), and it would pass it back when the value was available, saving some effort making your state explicit and writing many callbacks:
https://twisted.org/documents/21.2.0/api/twisted.internet.defer.html#inlineCallbacks https://twisted.org/documents/21.2.0/api/twisted.internet.de...