Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > c3732731228538f6126cae930c10ad71 > files > 178

python-pyro4-4.21-3.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Pyro4.futures — asynchronous calls &mdash; Pyro 4.21 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '4.21',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Pyro 4.21 documentation" href="../index.html" />
    <link rel="up" title="Pyro4 library API" href="../api.html" />
    <link rel="next" title="Socket server API contract" href="socketserver.html" />
    <link rel="prev" title="Pyro4.utils.flame — Foreign Location Automatic Module Exposer" href="flame.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="socketserver.html" title="Socket server API contract"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="flame.html" title="Pyro4.utils.flame — Foreign Location Automatic Module Exposer"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Pyro 4.21 documentation</a> &raquo;</li>
          <li><a href="../api.html" accesskey="U">Pyro4 library API</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-Pyro4.futures">
<span id="pyro4-futures-asynchronous-calls"></span><h1><a class="reference internal" href="#module-Pyro4.futures" title="Pyro4.futures"><tt class="xref py py-mod docutils literal"><span class="pre">Pyro4.futures</span></tt></a> &#8212; asynchronous calls<a class="headerlink" href="#module-Pyro4.futures" title="Permalink to this headline">¶</a></h1>
<p>Support for Futures (asynchronously executed callables).
If you&#8217;re using Python 3.2 or newer, also see
<a class="reference external" href="http://docs.python.org/3/library/concurrent.futures.html#future-objects">http://docs.python.org/3/library/concurrent.futures.html#future-objects</a></p>
<dl class="class">
<dt id="Pyro4.futures.Future">
<em class="property">class </em><tt class="descclassname">Pyro4.futures.</tt><tt class="descname">Future</tt><big>(</big><em>callable</em><big>)</big><a class="headerlink" href="#Pyro4.futures.Future" title="Permalink to this definition">¶</a></dt>
<dd><p>Holds a callable that will be executed asynchronously and provide its
result value some time in the future.
This is a more general implementation than the AsyncRemoteMethod, which
only works with Pyro proxies (and provides a bit different syntax).</p>
<dl class="method">
<dt id="Pyro4.futures.Future.then">
<tt class="descname">then</tt><big>(</big><em>call</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#Pyro4.futures.Future.then" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callable to the call chain, to be invoked when the results become available.
The result of the current call will be used as the first argument for the next call.
Optional extra arguments can be provided in args and kwargs.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Pyro4.futures.FutureResult">
<em class="property">class </em><tt class="descclassname">Pyro4.futures.</tt><tt class="descname">FutureResult</tt><a class="headerlink" href="#Pyro4.futures.FutureResult" title="Permalink to this definition">¶</a></dt>
<dd><p>The result object for asynchronous calls.</p>
<dl class="attribute">
<dt id="Pyro4.futures.FutureResult.ready">
<tt class="descname">ready</tt><a class="headerlink" href="#Pyro4.futures.FutureResult.ready" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean that contains the readiness of the async result</p>
</dd></dl>

<dl class="method">
<dt id="Pyro4.futures.FutureResult.then">
<tt class="descname">then</tt><big>(</big><em>call</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#Pyro4.futures.FutureResult.then" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callable to the call chain, to be invoked when the results become available.
The result of the current call will be used as the first argument for the next call.
Optional extra arguments can be provided in args and kwargs.</p>
</dd></dl>

<dl class="attribute">
<dt id="Pyro4.futures.FutureResult.value">
<tt class="descname">value</tt><a class="headerlink" href="#Pyro4.futures.FutureResult.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The result value of the call. Reading it will block if not available yet.</p>
</dd></dl>

<dl class="method">
<dt id="Pyro4.futures.FutureResult.wait">
<tt class="descname">wait</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#Pyro4.futures.FutureResult.wait" title="Permalink to this definition">¶</a></dt>
<dd><p>Wait for the result to become available, with optional timeout (in seconds).
Returns True if the result is ready, or False if it still isn&#8217;t ready.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/pyro.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="flame.html"
                        title="previous chapter"><tt class="docutils literal"><span class="pre">Pyro4.utils.flame</span></tt> &#8212; Foreign Location Automatic Module Exposer</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="socketserver.html"
                        title="next chapter">Socket server API contract</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="socketserver.html" title="Socket server API contract"
             >next</a> |</li>
        <li class="right" >
          <a href="flame.html" title="Pyro4.utils.flame — Foreign Location Automatic Module Exposer"
             >previous</a> |</li>
        <li><a href="../index.html">Pyro 4.21 documentation</a> &raquo;</li>
          <li><a href="../api.html" >Pyro4 library API</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Irmen de Jong.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>