mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
asyncio: add a note about (non) thread safety in each class
This commit is contained in:
parent
532c69a428
commit
83704963c0
6 changed files with 22 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue