Terry Jones <te...@jon.es> writes: > OK, maybe someone can explain the original "Well, it already raises > `CancelledError`. Every deferred that doesn't have explicitly handle > cancelling already does:" to me, because I didn't get it at all!
This is what happens when a deferred is cancelled: a) If the deferred hasn't been errbacked: 1. Call the provied canceller (provided when the deferred is constructed) 2. If a canceller isn't provided, or if the canceller didn't callback/errback, then errback with CancelledError. 3. If a canceller isn't provided, allow callback/errback to be called without error once. b) If the deferred has been fired, and is waiting on another deferred, cancel that deferred instead. Since most apis in twisted don't pass a canceller, the behavior is a2+a3. Tom _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python