This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document order of firing callbacks added with Future.add_done_callback()
Type: enhancement Stage:
Components: asyncio, Documentation Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cheryl.sabella, docs@python, socketpair, yselivanov
Priority: normal Keywords:

Created on 2017-07-25 15:13 by socketpair, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg299095 - (view) Author: Марк Коренберг (socketpair) * Date: 2017-07-25 15:13
Please document these two things:

* Order of callbacks firing is not specified. (Is it True?)
* All callbacks are called *BEFORE* await triggered:
  ====
  f = asyncio.Future()
  f.add_done_callback(xxx)
  f.add_done_callback(yyy)
  try:
     await f
  except Exception:
     ...  # all callbacks are called BEFORE entering that place (for example)
* How exceptions in callbacks are handled
msg336485 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-02-24 22:13
The docs for asyncio were rewritten in September 2018.

@socketpair, please take a look at the new documentation and update this ticket if any of your requests are now explained.  If not, would you be able to provide more specific suggestions of what you would like to see included?

Thanks!
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75218
2019-02-24 22:13:05cheryl.sabellasetversions: + Python 3.8, - Python 3.5, Python 3.6
nosy: + cheryl.sabella

messages: + msg336485

assignee: docs@python ->
2017-07-25 15:13:38socketpaircreate