On 10/1/05, Antoine <solipsis at pitrou.net> wrote: > > > like this with their "deferred objects", no? I figure they would > > need to do something like this too. I will have to check.) > > A Deferred object is just the abstraction of a callback - or, rather, two > callbacks: one for success and one for failure. Twisted is architected > around an event loop, which calls your code back when a registered event > happens (for example when an operation is finished, or when some data > arrives on the wire). Compared to generators, it is a different way of > expressing cooperative multi-threading. So, the question is, in Twisted, if I want to defer on an operation that is going to block, say I'm making a call to run a database query that I'm expecting will take much time, and want to yield ("defer") for other events to be processed while the query is executed, how do I do that? As far as I remember the Twisted docs I read a long time ago did not provide a solution for that.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4