Repository navigation
Commit 543df99
committed
pythongh-99633: _contextvars: Enter the thread's initial context
No public API provides access to the current context yet (only a new
copy), however:
* This is good defensive practice.
* This improves code readability.
* Context watchers are now notified about the initial context.
* A planned future commit will make it possible for users to access
the thread's initial context object. Without this change, users
would be able to enter the context a second time, causing a cycle
in the context stack.1 parent 11c500b commit 543df99
1 file changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
| 485 | + | |
485 | 486 | | |
486 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
487 | 491 | | |
488 | 492 | | |
489 | 493 | | |
| |||
0 commit comments