[Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

Tom Prince tom.prince at ualberta.net
Fri Jun 21 00:18:29 MDT 2013


Terry Jones <terry at jon.es> writes:
> But, I also built some queuing things where I would have liked extra
> information. For example, an app is processing jobs on behalf of a user,
> [...]

Thinking about this for a little bit, it seems like there is quite a bit
more state to your jobs, that simply an eventual result (i.e. a
deferred). So, it seems to me that you want to represent your jobs as
more than simply a deferred. At the very least, you need to record what
the jobs is, so that it can be restarted later, if necessary.

Deferreds are a way of abstracting data and/or control flow in
asynchronous way. I'm not sure that trying to think of a deferred as a
job is a useful thing to do; most any example of a job that I can think
of likely involves multiple deferred objects (often chained by returning
them from callbcks).

  Tom



More information about the Twisted-Python mailing list