Commit Graph

47 Commits

Author SHA1 Message Date
Roger Iyengar c68c5af2dc
Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882)
I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide. 

This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future.

I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful.
2020-08-29 16:47:38 -07:00
Roger Iyengar a16d697049
Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-06-22 22:16:00 -04:00
Victor Stinner b9783d2e03
bpo-39429: Add a new "Python Development Mode" doc page (GH-18132) 2020-01-24 10:22:18 +01:00
Roger Iyengar 675d17cec4 Fix grammar in asyncio-dev.rst (GH-15672)
Automerge-Triggered-By: @ned-deily
2019-09-03 23:04:09 -07:00
Benjamin Peterson 4e3a53bcee
Fix a typo in asyncio-dev.rst. (GH-10133)
"threadsafe"
2018-10-26 10:14:04 -07:00
Elvis Pranskevichus 1fa2ec49be bpo-33649: A copy-editing pass on asyncio documentation (GH-9376) 2018-09-17 19:16:44 -04:00
Yury Selivanov 805e27eff6
bpo-33649: Fix asyncio-dev (GH-9324) 2018-09-14 16:57:11 -07:00
Grant 5acccfaf68 Grammar fix (GH-9318) 2018-09-14 14:37:48 -07:00
Carol Willing 1abba455d1 Polish doc as part of asyncio doc improvement (GH-9185) 2018-09-12 22:40:37 -07:00
Yury Selivanov 7c7605ff11
bpo-33649: First asyncio docs improvement pass (GH-9142)
Rewritten/updated sections:

* Event Loop APIs
* Transports & Protocols
* Streams
* Exceptions
* Policies
* Queues
* Subprocesses
* Platforms
2018-09-11 09:54:40 -07:00
Andrew Svetlov 8874342cf3
bpo-32258: Replace 'yield from' to 'await' in asyncio docs (#4779)
* Replace 'yield from' to 'await' in asyncio docs

* Fix docstrings
2017-12-11 17:35:49 +02:00
Ashley Camba f8802d80b3 Asyncion-Dev docs: Fix the reference to sys.excepthook (GH-4414) 2017-11-24 15:39:39 -08:00
Victor Stinner 44862df2ee
bpo-32047: -X dev enables asyncio debug mode (#4418)
The new -X dev command line option now also enables asyncio debug
mode.
2017-11-20 07:14:07 -08:00
Mike DePalatis 87c3c5de73 Improve grammar in asyncio documentation (GH-2993)
"not only is it .." is the correct form, as opposed to:
"not only it is ..."
2017-08-04 00:20:42 +10:00
Guido van Rossum ba29a4fd82 Issue #21443: Show how to change log level for asyncio. 2016-10-13 13:56:40 -07:00
Guido van Rossum f68afd8544 Issue #27700: Document AbstractEventLoop, not BaseEventLoop. 2016-08-08 09:41:21 -07:00
Martin Panter 1050d2d0c7 Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.
Patch by Julien Palard.
2016-07-26 11:18:21 +02:00
Guido van Rossum 5db034acfa Docs and one small improvement for issue #25304, by Vincent Michel. (Merge 3.4->3.5.) 2015-10-05 16:23:13 -07:00
Guido van Rossum 601953b679 Docs and one small improvement for issue #25304, by Vincent Michel. 2015-10-05 16:20:00 -07:00
Andrew Svetlov 1c99e529dd Merge 3.4 -> 3.5 2015-09-24 14:35:16 +03:00
Andrew Svetlov 4919907774 Fix #25208: Improve "Develop with asyncio" doc page.
Patch by Benjamin Hodgson.
2015-09-24 14:32:39 +03:00
Yury Selivanov 04356e1f6f Issue #24487: Rename async() -> ensure_future() in asyncio docs.
Patch by Martin Panter.
2015-06-30 22:13:22 -04:00
Yury Selivanov d7e19bb566 docs/asyncio: Document new ensure_future() and deprecated async() 2015-05-11 16:33:41 -04:00
Victor Stinner b8064a8a16 asyncio doc: close explicitly event loops 2015-02-23 11:41:56 +01:00
Victor Stinner 6a1b004b83 asyncio doc: explain how to display ResourceWarning in the debug mode section 2015-02-04 16:14:33 +01:00
Victor Stinner 188f2c0b75 asyncio doc: document the new ResourceWarning warnings 2015-01-30 01:35:14 +01:00
Victor Stinner 1077dee457 asyncio doc: add a section about task cancellation 2015-01-30 00:55:58 +01:00
Victor Stinner 399c59d7bd asyncio doc: list limitations to run subprocesses from different threads 2015-01-09 01:32:02 +01:00
Zachary Ware 5819cfa5aa Cosmetic fixes to the 'Develop with asyncio' page 2015-01-06 00:40:43 -06:00
Victor Stinner ab1c853079 asyncio doc: update debug traces 2014-10-12 21:37:16 +02:00
Victor Stinner d71dcbb043 asyncio: update the doc
* dev: mention that the logging must be configured at DEBUG level
* streams: drain() has no more a strange return value, it's just
  a standard coroutine
2014-08-25 17:04:12 +02:00
Victor Stinner 530ef2f069 Update asyncio documentation
- Document the new create_task() method
- "Hide" the Task class: point to the create_task() method for interoperability
- Rewrite the documentation of the Task class
- Document the "Pending task destroyed"
- Update output in debug mode of examples in the dev section
- Replace Task() with create_task() in examples
2014-07-08 12:39:10 +02:00
Victor Stinner 62511fd6d6 asyncio: document the debug mode 2014-06-23 00:36:11 +02:00
Victor Stinner 1415e25e05 asyncio doc: remove reference to _DEBUG (now replaced with PYTHONASYNCIODEBUG
env var), document the default debug mode
2014-02-20 01:44:10 +01:00
Victor Stinner 0f3e6bca1b asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.
Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since
Python startup, to be able to debug coroutines defined directly in the asyncio
module.
2014-02-19 23:15:02 +01:00
Victor Stinner 86516d9225 Close #20649: Fix typo in asyncio doc. Patch written by Brett Cannon. 2014-02-18 09:22:00 +01:00
Eli Bendersky b73c83318d Various formatting & grammar fixes in asyncio* docs. 2014-02-09 06:07:47 -08:00
Victor Stinner 790202d613 asyncio doc: mention that asyncio is not thread-safe 2014-02-07 19:03:05 +01:00
Guido van Rossum 3c9bb69fa1 Add missing word ("thread") to sentence about call_soon_threadsafe. 2014-02-04 13:49:34 -08:00
Victor Stinner 5cb84ed5b1 asyncio doc: add an example to schedule a coroutine from a different thread 2014-02-04 18:18:27 +01:00
Victor Stinner 9592edb834 asyncio doc: add "asyncio-" prefix to references 2014-02-02 15:03:02 +01:00
Victor Stinner 606ab031c1 asyncio doc: add "Concurrency and multithreading" section 2014-02-01 03:18:58 +01:00
Victor Stinner 45b27ed53d asyncio doc: document the granularity of the event loop
Improve also the "Logging" section
2014-02-01 02:36:43 +01:00
Victor Stinner f40c66334d asyncio doc: close the loop at exit 2014-01-28 23:32:40 +01:00
Eli Bendersky 679688e70d Fix grammar and add markup 2014-01-20 08:13:31 -08:00
Victor Stinner 9731183390 asyncio: oops, add missing word :-) 2014-01-17 10:31:02 +01:00
Victor Stinner db39a0da0c asyncio: add a new "Develop with asyncio" section to the documentation 2014-01-16 18:58:01 +01:00