Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Here are some commented examples of how the chainDeferred method in Twisted's Deferred class can be a bit surprising, or cause errors, or perhaps even dangerous (not calling cancel on chained deferreds). There's an alternate Deferred class in tdefer.py that shows one way we might go about addressing these issues. Note that it's not suggested as a perfect solution, just a possible direction. Deferreds are complicated and the tdefer.py class probably gets things wrong in some cases. So tdefer.py is just a pointer to how we might do things, intended to start discussion. (tdefer.py is based on Twisted 10.1) To run an example using normal deferreds, invoke it using Python from the command line. E.g., $ python uncalled.py cancel one cancelled one To run with tdefer.py add an argument (anything at all): $ python uncalled.py xxx cancel one cancelled one cancel two cancelled two Terry Jones email@example.com http://twitter.com/terrycojones