| Home | Trees | Index | Help |
|
|---|
| Package twisted :: Package internet :: Module defer |
|
Support for results that aren't immediately available.
API Stability: stable
Maintainer: Glyph Lefkowitz| Classes | |
|---|---|
_nothing |
|
Deferred |
This is a callback which will be put off until later. |
DeferredList |
I combine a group of deferreds into one callback. |
| Exceptions | |
|---|---|
AlreadyArmedError |
|
AlreadyCalledError |
|
TimeoutError |
|
| Function Summary | |
|---|---|
_parseDListResult(l,
fireOnOneErrback)
| |
Create a deferred from a callable and arguments. | |
fail(result)
| |
Returns list with result of given Deferreds. | |
logError(err)
| |
Deferred
|
Invoke a function that may or may not return a deferred. |
passthru(arg)
| |
succeed(result)
| |
timeout(deferred)
| |
| Variable Summary | |
|---|---|
int |
FAILURE = 0 |
int |
SUCCESS = 1 |
| Function Details |
|---|
execute(callable, *args, **kw)Create a deferred from a callable and arguments. Call the given function with the given arguments. Return a deferred which has been fired with its callback as the result of that invocation or its errback with a Failure for the exception thrown. |
gatherResults(deferredList, fireOnOneErrback=0)Returns list with result of given Deferreds. This builds onDeferredList but is useful since you
don't need to parse the result for success/failure.
|
maybeDeferred(f, *args, **kw)Invoke a function that may or may not return a deferred. Call the given function with the given arguments. If the returned object is aDeferred, return it. If the returned object is
a Failure, wrap it with fail and return it.
Otherwise, wrap it in succeed and return it. If an
exception is raised, convert it to a Failure, wrap it in
fail, and then return it.
|
| Variable Details |
|---|
FAILURE
|
SUCCESS
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.0 on Tue Dec 9 17:48:02 2003 | http://epydoc.sf.net |