Inheritance diagram for IPython.kernel.twistedutil:
Things directly related to all of twisted.
Bases: twisted.internet.defer.Deferred
I combine a group of deferreds into one callback.
I track a list of L{Deferred}s for their callbacks, and make a single callback when they have all completed, a list of (success, result) tuples, ‘success’ being a boolean.
Note that you can still use a L{Deferred} after putting it in a DeferredList. For example, you can suppress ‘Unhandled error in Deferred’ messages by adding errbacks to the Deferreds after putting them in the DeferredList, as a DeferredList won’t swallow the errors. (Although a more convenient way to do this is simply to set the consumeErrors flag)
Note: This is a modified version of the twisted.internet.defer.DeferredList
Initialize a DeferredList.
@type deferredList: C{list} of L{Deferred}s @param deferredList: The list of deferreds to track. @param fireOnOneCallback: (keyword param) a flag indicating that
only one callback needs to be fired for me to call my callback
Bases: threading.Thread
Run the twisted reactor in a different thread.
For the process to be able to exit cleanly, do the following:
rit = ReactorInThread() rit.setDaemon(True) rit.start()
Wait (poll) for a file to be created.
This method returns a Deferred that will fire when a file exists. It works by polling os.path.isfile in time intervals specified by the delay argument. If max_tries is reached, it will errback with a FileTimeoutError.
Parameters: | filename : str
delay : float
max_tries : int
|
---|---|
Returns: | d : Deferred
|