mcmandelbrot.wire.RemoteRunner(object)
class documentation
Part of mcmandelbrot.wire
(View In Hierarchy)
Method | __init__ | Undocumented |
Method | setup | Call at least once to set things up. Repeated calls with the same
keywords, or with no keywords, do nothing. Keywords with a value of
None are ignored. |
Method | shutdown | Undocumented |
Method | run | No summary |
Method | writeImage | Call with the same arguments as run after
fh, preceded by a writable fileName. It will be opened for
writing and its file handle supplied to run as
fh. |
Method | showStats | Undocumented |
def setup(self, **kw):
Call at least once to set things up. Repeated calls with the same
keywords, or with no keywords, do nothing. Keywords with a value of
None
are ignored.
Parameters | N_values | The number of possible values for each iteration. |
steepness | The steepness of the exponential applied to the value curve. | |
worker | A custom worker to use instead of asynqueue.wire.WireWorker . | |
Returns | A Deferred that fires when things are setup, or immediately if
they already are as specified. |
def run(self, fh, Nx, cr, ci, crPM, ciPM, dCancel=None, requester=None):
Runs a compute
method on a remote Python interpreter to
generate a PNG image of the Mandelbrot Set and write it in chunks,
indirectly, to the write-capable object fh, which in this case must
implement IConsumer
. When this method is called by image.Imager.renderImage
,
fh will be a request and those do implement
IConsumer
.
The image is centered at location cr, ci in the complex plane, plus or minus crPM on the real axis and ciPM on the imaginary axis.
Returns | A Deferred that fires with the total elasped time for the
computation and the number of pixels computed. | |
See Also | runner.Runner.run .
This method doesn't call |
def writeImage(self, fileName, *args, **kw):
Call with the same arguments as run
after
fh, preceded by a writable fileName. It will be opened for
writing and its file handle supplied to run
as
fh.
Writes the PNG image as it is generated remotely, returning a
Deferred
that fires with the result of run
when
the image is all written.
See Also | setup
and run |