# m.r.Runner(object) : class documentation

Part of mcmandelbrot.runner View In Hierarchy **•** Source for `runner.py`

**•** Project Page for `AsynQueue`

I run a multi-process Mandelbrot Set computation operation.

Class Variable | N_processes 0 | The number of processes to use, disregarded if useThread is set `True` in my constructor. |

Method | __init__ | Undocumented |

Method | shutdown | Undocumented |

Method | N_processes | Undocumented |

Method | log | Undocumented |

Method | run | Runs my `compute` method to generate a PNG image of the Mandelbrot Set and write it in chunks to the file handle or write-capable object fh. |

Method | compute | Computes the Mandelbrot Set under `Twisted` and generates a pretty image, written as a PNG image to the supplied file handle fh one row at a time. |

Method | showStats | Displays stats about the run on stdout |

*useThread*is set

`True`

in my constructor.Runs my `compute`

method to generate a PNG image of the Mandelbrot Set and write it in chunks to the file handle or write-capable object *fh*.

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. |

def compute(self, fh, xSpan, ySpan, dCancel=None):

Computes the Mandelbrot Set under `Twisted`

and generates a pretty image, written as a PNG image to the supplied file handle *fh* one row at a time.

Returns | A `Deferred` that fires when the image is completely written and you can close the file handle, with the number of pixels computed (may be a lower number than expected if the connection terminated early). |