File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Synchronization Primitives
1111-----------------------------------------------
1212
1313asyncio synchronization primitives are designed to be similar to
14- those of the :mod: `threading ` module with two important caveats:
14+ those of the :mod: `threading ` module with several important caveats:
1515
1616* asyncio primitives are not thread-safe, therefore they should not
1717 be used for OS thread synchronization (use :mod: `threading ` for
@@ -21,6 +21,10 @@ those of the :mod:`threading` module with two important caveats:
2121 argument; use the :func: `asyncio.wait_for ` function to perform
2222 operations with timeouts.
2323
24+ * asyncio primitives are bound to a specific event loop and must be
25+ constructed inside the loop to function correctly. A common mistake is
26+ constructing them before the loop starts, such as with global variables.
27+
2428asyncio has the following basic synchronization primitives:
2529
2630* :class: `Lock `
You can’t perform that action at this time.
0 commit comments