asyncio: add a note about (non) thread safety in each class

This commit is contained in:
Victor Stinner 2015-02-25 14:24:15 +01:00
parent 532c69a428
commit 83704963c0
6 changed files with 22 additions and 0 deletions

View file

@ -209,6 +209,8 @@ Future
:func:`~concurrent.futures.as_completed` functions in the
:mod:`concurrent.futures` package.
This class is :ref:`not thread safe <asyncio-multithreading>`.
.. method:: cancel()
Cancel the future and schedule callbacks.
@ -375,6 +377,8 @@ Task
Don't directly create :class:`Task` instances: use the :func:`async`
function or the :meth:`BaseEventLoop.create_task` method.
This class is :ref:`not thread safe <asyncio-multithreading>`.
.. classmethod:: all_tasks(loop=None)
Return a set of all tasks for an event loop.