Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > a600cd26dfe6bfd8c11f12bce5cb0eee > files > 688

python3-docs-3.5.3-1.1.mga6.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>18.5. asyncio — Asynchronous I/O, event loop, coroutines and tasks &mdash; Python 3.5.3 documentation</title>
    
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.5.3',
        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>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 3.5.3 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python 3.5.3 documentation" href="../contents.html" />
    <link rel="up" title="18. Interprocess Communication and Networking" href="ipc.html" />
    <link rel="next" title="18.5.1. Base Event Loop" href="asyncio-eventloop.html" />
    <link rel="prev" title="18.4. selectors — High-level I/O multiplexing" href="selectors.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    <script type="text/javascript" src="../_static/version_switch.js"></script>
    
    
 

  </head>
  <body role="document">  
    <div class="related" role="navigation" aria-label="related navigation">
      <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="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="asyncio-eventloop.html" title="18.5.1. Base Event Loop"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="selectors.html" title="18.4. selectors — High-level I/O multiplexing"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.5.3</span>
          <a href="../index.html">Documentation </a> &raquo;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li class="nav-item nav-item-2"><a href="ipc.html" accesskey="U">18. Interprocess Communication and Networking</a> &raquo;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="Quick search" 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>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-asyncio">
<span id="asyncio-asynchronous-i-o-event-loop-coroutines-and-tasks"></span><h1>18.5. <a class="reference internal" href="#module-asyncio" title="asyncio: Asynchronous I/O, event loop, coroutines and tasks."><code class="xref py py-mod docutils literal"><span class="pre">asyncio</span></code></a> &#8212; Asynchronous I/O, event loop, coroutines and tasks<a class="headerlink" href="#module-asyncio" title="Permalink to this headline">¶</a></h1>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4.</span></p>
</div>
<p><strong>Source code:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/asyncio/">Lib/asyncio/</a></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The asyncio package has been included in the standard library on a
<a class="reference internal" href="../glossary.html#term-provisional-package"><span class="xref std std-term">provisional basis</span></a>. Backwards incompatible
changes (up to and including removal of the module) may occur if deemed
necessary by the core developers.</p>
</div>
<hr class="docutils" />
<p>This module provides infrastructure for writing single-threaded concurrent
code using coroutines, multiplexing I/O access over sockets and other
resources, running network clients and servers, and other related primitives.
Here is a more detailed list of the package contents:</p>
<ul class="simple">
<li>a pluggable <a class="reference internal" href="asyncio-eventloop.html#asyncio-event-loop"><span>event loop</span></a> with various system-specific
implementations;</li>
<li><a class="reference internal" href="asyncio-protocol.html#asyncio-transport"><span>transport</span></a> and <a class="reference internal" href="asyncio-protocol.html#asyncio-protocol"><span>protocol</span></a> abstractions
(similar to those in <a class="reference external" href="https://twistedmatrix.com/trac/">Twisted</a>);</li>
<li>concrete support for TCP, UDP, SSL, subprocess pipes, delayed calls, and
others (some may be system-dependent);</li>
<li>a <a class="reference internal" href="asyncio-task.html#asyncio.Future" title="asyncio.Future"><code class="xref py py-class docutils literal"><span class="pre">Future</span></code></a> class that mimics the one in the <a class="reference internal" href="concurrent.futures.html#module-concurrent.futures" title="concurrent.futures: Execute computations concurrently using threads or processes."><code class="xref py py-mod docutils literal"><span class="pre">concurrent.futures</span></code></a>
module, but adapted for use with the event loop;</li>
<li>coroutines and tasks based on <code class="docutils literal"><span class="pre">yield</span> <span class="pre">from</span></code> (<span class="target" id="index-0"></span><a class="pep reference external" href="https://www.python.org/dev/peps/pep-0380"><strong>PEP 380</strong></a>), to help write
concurrent code in a sequential fashion;</li>
<li>cancellation support for <a class="reference internal" href="asyncio-task.html#asyncio.Future" title="asyncio.Future"><code class="xref py py-class docutils literal"><span class="pre">Future</span></code></a>s and coroutines;</li>
<li><a class="reference internal" href="asyncio-sync.html#asyncio-sync"><span>synchronization primitives</span></a> for use between coroutines in
a single thread, mimicking those in the <a class="reference internal" href="threading.html#module-threading" title="threading: Thread-based parallelism."><code class="xref py py-mod docutils literal"><span class="pre">threading</span></code></a> module;</li>
<li>an interface for passing work off to a threadpool, for times when
you absolutely, positively have to use a library that makes blocking
I/O calls.</li>
</ul>
<p>Asynchronous programming is more complex than classical &#8220;sequential&#8221;
programming: see the <a class="reference internal" href="asyncio-dev.html#asyncio-dev"><span>Develop with asyncio</span></a> page which lists
common traps and explains how to avoid them. <a class="reference internal" href="asyncio-dev.html#asyncio-debug-mode"><span>Enable the debug mode</span></a> during development to detect common issues.</p>
<p>Table of contents:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="asyncio-eventloop.html">18.5.1. Base Event Loop</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#run-an-event-loop">18.5.1.1. Run an event loop</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#calls">18.5.1.2. Calls</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#delayed-calls">18.5.1.3. Delayed calls</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#futures">18.5.1.4. Futures</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#tasks">18.5.1.5. Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#creating-connections">18.5.1.6. Creating connections</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#creating-listening-connections">18.5.1.7. Creating listening connections</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#watch-file-descriptors">18.5.1.8. Watch file descriptors</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#low-level-socket-operations">18.5.1.9. Low-level socket operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#resolve-host-name">18.5.1.10. Resolve host name</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#connect-pipes">18.5.1.11. Connect pipes</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#unix-signals">18.5.1.12. UNIX signals</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#executor">18.5.1.13. Executor</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#error-handling-api">18.5.1.14. Error Handling API</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#debug-mode">18.5.1.15. Debug mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#server">18.5.1.16. Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#handle">18.5.1.17. Handle</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloop.html#event-loop-examples">18.5.1.18. Event loop examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloop.html#hello-world-with-call-soon">18.5.1.18.1. Hello World with call_soon()</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloop.html#display-the-current-date-with-call-later">18.5.1.18.2. Display the current date with call_later()</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloop.html#watch-a-file-descriptor-for-read-events">18.5.1.18.3. Watch a file descriptor for read events</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloop.html#set-signal-handlers-for-sigint-and-sigterm">18.5.1.18.4. Set signal handlers for SIGINT and SIGTERM</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-eventloops.html">18.5.2. Event loops</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#event-loop-functions">18.5.2.1. Event loop functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#available-event-loops">18.5.2.2. Available event loops</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#platform-support">18.5.2.3. Platform support</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloops.html#windows">18.5.2.3.1. Windows</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-eventloops.html#mac-os-x">18.5.2.3.2. Mac OS X</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#event-loop-policies-and-the-default-policy">18.5.2.4. Event loop policies and the default policy</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#event-loop-policy-interface">18.5.2.5. Event loop policy interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-eventloops.html#access-to-the-global-loop-policy">18.5.2.6. Access to the global loop policy</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-task.html">18.5.3. Tasks and coroutines</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#coroutines">18.5.3.1. Coroutines</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-hello-world-coroutine">18.5.3.1.1. Example: Hello World coroutine</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-coroutine-displaying-the-current-date">18.5.3.1.2. Example: Coroutine displaying the current date</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-chain-coroutines">18.5.3.1.3. Example: Chain coroutines</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#invalidstateerror">18.5.3.2. InvalidStateError</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#timeouterror">18.5.3.3. TimeoutError</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#future">18.5.3.4. Future</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-future-with-run-until-complete">18.5.3.4.1. Example: Future with run_until_complete()</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-future-with-run-forever">18.5.3.4.2. Example: Future with run_forever()</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#task">18.5.3.5. Task</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-task.html#example-parallel-execution-of-tasks">18.5.3.5.1. Example: Parallel execution of tasks</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-task.html#task-functions">18.5.3.6. Task functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-protocol.html">18.5.4. Transports  and protocols (callback based API)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-protocol.html#transports">18.5.4.1. Transports</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#basetransport">18.5.4.1.1. BaseTransport</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#readtransport">18.5.4.1.2. ReadTransport</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#writetransport">18.5.4.1.3. WriteTransport</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#datagramtransport">18.5.4.1.4. DatagramTransport</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#basesubprocesstransport">18.5.4.1.5. BaseSubprocessTransport</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-protocol.html#protocols">18.5.4.2. Protocols</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#protocol-classes">18.5.4.2.1. Protocol classes</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#connection-callbacks">18.5.4.2.2. Connection callbacks</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#streaming-protocols">18.5.4.2.3. Streaming protocols</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#datagram-protocols">18.5.4.2.4. Datagram protocols</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#flow-control-callbacks">18.5.4.2.5. Flow control callbacks</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#coroutines-and-protocols">18.5.4.2.6. Coroutines and protocols</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-protocol.html#protocol-examples">18.5.4.3. Protocol examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#tcp-echo-client-protocol">18.5.4.3.1. TCP echo client protocol</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#tcp-echo-server-protocol">18.5.4.3.2. TCP echo server protocol</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#udp-echo-client-protocol">18.5.4.3.3. UDP echo client protocol</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#udp-echo-server-protocol">18.5.4.3.4. UDP echo server protocol</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-protocol.html#register-an-open-socket-to-wait-for-data-using-a-protocol">18.5.4.3.5. Register an open socket to wait for data using a protocol</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-stream.html">18.5.5. Streams (coroutine based API)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#stream-functions">18.5.5.1. Stream functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#streamreader">18.5.5.2. StreamReader</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#streamwriter">18.5.5.3. StreamWriter</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#streamreaderprotocol">18.5.5.4. StreamReaderProtocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#incompletereaderror">18.5.5.5. IncompleteReadError</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#limitoverrunerror">18.5.5.6. LimitOverrunError</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-stream.html#stream-examples">18.5.5.7. Stream examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-stream.html#tcp-echo-client-using-streams">18.5.5.7.1. TCP echo client using streams</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-stream.html#tcp-echo-server-using-streams">18.5.5.7.2. TCP echo server using streams</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-stream.html#get-http-headers">18.5.5.7.3. Get HTTP headers</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-stream.html#register-an-open-socket-to-wait-for-data-using-streams">18.5.5.7.4. Register an open socket to wait for data using streams</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-subprocess.html">18.5.6. Subprocess</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#windows-event-loop">18.5.6.1. Windows event loop</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#create-a-subprocess-high-level-api-using-process">18.5.6.2. Create a subprocess: high-level API using Process</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#create-a-subprocess-low-level-api-using-subprocess-popen">18.5.6.3. Create a subprocess: low-level API using subprocess.Popen</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#constants">18.5.6.4. Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#process">18.5.6.5. Process</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#subprocess-and-threads">18.5.6.6. Subprocess and threads</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-subprocess.html#subprocess-examples">18.5.6.7. Subprocess examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-subprocess.html#subprocess-using-transport-and-protocol">18.5.6.7.1. Subprocess using transport and protocol</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-subprocess.html#subprocess-using-streams">18.5.6.7.2. Subprocess using streams</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-sync.html">18.5.7. Synchronization primitives</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-sync.html#locks">18.5.7.1. Locks</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-sync.html#lock">18.5.7.1.1. Lock</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-sync.html#event">18.5.7.1.2. Event</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-sync.html#condition">18.5.7.1.3. Condition</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-sync.html#semaphores">18.5.7.2. Semaphores</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-sync.html#semaphore">18.5.7.2.1. Semaphore</a></li>
<li class="toctree-l3"><a class="reference internal" href="asyncio-sync.html#boundedsemaphore">18.5.7.2.2. BoundedSemaphore</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-queue.html">18.5.8. Queues</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-queue.html#queue">18.5.8.1. Queue</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-queue.html#priorityqueue">18.5.8.2. PriorityQueue</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-queue.html#lifoqueue">18.5.8.3. LifoQueue</a><ul>
<li class="toctree-l3"><a class="reference internal" href="asyncio-queue.html#exceptions">18.5.8.3.1. Exceptions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncio-dev.html">18.5.9. Develop with asyncio</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#debug-mode-of-asyncio">18.5.9.1. Debug mode of asyncio</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#cancellation">18.5.9.2. Cancellation</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#concurrency-and-multithreading">18.5.9.3. Concurrency and multithreading</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#handle-blocking-functions-correctly">18.5.9.4. Handle blocking functions correctly</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#logging">18.5.9.5. Logging</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#detect-coroutine-objects-never-scheduled">18.5.9.6. Detect coroutine objects never scheduled</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#detect-exceptions-never-consumed">18.5.9.7. Detect exceptions never consumed</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#chain-coroutines-correctly">18.5.9.8. Chain coroutines correctly</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#pending-task-destroyed">18.5.9.9. Pending task destroyed</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncio-dev.html#close-transports-and-event-loops">18.5.9.10. Close transports and event loops</a></li>
</ul>
</li>
</ul>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">The <a class="reference internal" href="#module-asyncio" title="asyncio: Asynchronous I/O, event loop, coroutines and tasks."><code class="xref py py-mod docutils literal"><span class="pre">asyncio</span></code></a> module was designed in <span class="target" id="index-1"></span><a class="pep reference external" href="https://www.python.org/dev/peps/pep-3156"><strong>PEP 3156</strong></a>. For a
motivational primer on transports and protocols, see <span class="target" id="index-2"></span><a class="pep reference external" href="https://www.python.org/dev/peps/pep-3153"><strong>PEP 3153</strong></a>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="selectors.html"
                        title="previous chapter">18.4. <code class="docutils literal"><span class="pre">selectors</span></code> &#8212; High-level I/O multiplexing</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="asyncio-eventloop.html"
                        title="next chapter">18.5.1. Base Event Loop</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../bugs.html">Report a Bug</a></li>
      <li><a href="../_sources/library/asyncio.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
  </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <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="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="asyncio-eventloop.html" title="18.5.1. Base Event Loop"
             >next</a> |</li>
        <li class="right" >
          <a href="selectors.html" title="18.4. selectors — High-level I/O multiplexing"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.5.3</span>
          <a href="../index.html">Documentation </a> &raquo;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li class="nav-item nav-item-2"><a href="ipc.html" >18. Interprocess Communication and Networking</a> &raquo;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="Quick search" 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>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 2001-2017, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Jan 20, 2017.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
    </div>

  </body>
</html>