asynqueue.iteration.Prefetcherator(object)
class documentation
Part of asynqueue.iteration
(View In Hierarchy)
Method | __init__ | Undocumented |
Method | __repr__ | An informative representation. You may thank me for having this during development. |
Method | isBusy | |
Method | setup | Sets me up with an attempt at an initial prefetch. |
Method | getNext | Prefetch analog to __next__ on a regular iterator. |
Method | _tryNext | Returns a deferred that fires with the value from my
nextCallTuple along with a bool indicating if it's a
valid value. |
An informative representation. You may thank me for having this during development.
Returns | True if I've been set up with a call to setup
and am still running whatever iteration that involved. |
Returns a deferred that fires with the value from my
nextCallTuple along with a bool
indicating if it's a
valid value.
Deletes the nextValue reference after it returns with a failure.
Sets me up with an attempt at an initial prefetch.
Set me up with a new iterator, or the callable for an iterator-like-object, along with any args or keywords. Does a first prefetch.
Returns | A Deferred that fires with True if all goes well
or False otherwise. |
Prefetch analog to __next__
on a regular iterator.
Gets the next value from my current iterator, or a deferred value from my current nextCallTuple, returning it along with a Bool indicating if this is a valid value and another one indicating if more values are left.
Once a prefetch returns a bogus value, the result of this call will remain (None, False, False), until a new iterator or nextCallable is set.
Use this method as the callable (second constructor argument) of Deferator
.