[Twisted-Python] Submitted for your consideration
andrew-twisted at puzzling.org
Wed Jun 11 08:30:07 EDT 2003
On Wed, Jun 11, 2003 at 07:36:42AM -0400, Jp Calderone wrote:
> + # Disable the idle timeout, in case this request takes a long
> + # time to finish generating output.
> + if self.timeOut:
> + self._savedTimeOut = self.setTimeout(None)
> + else:
> + if self._savedTimeOut:
> + self.setTimeout(self._savedTimeOut)
I wonder if this idiom would be simplified by having a .cancelTimeout
method, rather than overloading .setTimeout(None) to mean that?
These snippets could then look like something like:
+ # Disable the idle timeout, in case this request takes a long
+ # time to finish generating output.
Or perhaps I'm just in an overly fussy mood tonight :)
More information about the Twisted-Python