.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.delayedresult

.. highlight:: python



.. _wx.lib.delayedresult.Producer:

==========================================================================================================================================
|phoenix_title|  **wx.lib.delayedresult.Producer**
==========================================================================================================================================

Represent the worker thread that produces delayed results.
It causes the given function to run in a separate thread,
and a sender to be used to send the return value of the function.
As with any threading.Thread, instantiate and call start().
Note that if the workerFn raises AbortedException, the result is not
sent and the thread terminates gracefully.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>Producer</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.delayedresult.Producer_inheritance.png" alt="Inheritance diagram of Producer" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="http://docs.python.org/library/threading.html#threading._Verbose" title="threading._Verbose" alt="" coords="35,5,181,35"/> <area shape="rect" id="node3" href="http://docs.python.org/library/threading.html#threading.Thread" title="threading.Thread" alt="" coords="43,83,172,112"/> <area shape="rect" id="node2" href="wx.lib.delayedresult.Producer.html" title="wx.lib.delayedresult.Producer" alt="" coords="5,160,211,189"/> </map> 
   </p>

|


|super_classes| Known Superclasses
==================================

`threading.Thread <http://docs.python.org/library/threading.html#threading.Thread>`_

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.delayedresult.Producer.__init__`                                  The sender will send the return value of
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: Producer(threading.Thread)

   Represent the worker thread that produces delayed results.
   It causes the given function to run in a separate thread,
   and a sender to be used to send the return value of the function.
   As with any threading.Thread, instantiate and call start().
   Note that if the workerFn raises AbortedException, the result is not
   sent and the thread terminates gracefully.

   .. method:: __init__(self, sender, workerFn, args=(), kwargs={}, name=None, group=None, daemon=False, sendReturn=True, senderArg=None)

      The sender will send the return value of
      `workerFn(*args, **kwargs)` to the main thread. The name and group
      are same as threading.Thread constructor parameters. Daemon causes
      setDaemon() to be called. If sendReturn is False, then the return
      value of workerFn() will not be sent. If senderArg is given, it
      must be the name of the keyword arg to use to pass the sender into
      the workerFn, so the function can send (typically many) results.


