mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-32591: Add native coroutine origin tracking (#5250)
* Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread
This commit is contained in:
parent
1211c9a989
commit
fc2f407829
20 changed files with 485 additions and 100 deletions
|
@ -305,6 +305,8 @@ new_threadstate(PyInterpreterState *interp, int init)
|
|||
tstate->on_delete = NULL;
|
||||
tstate->on_delete_data = NULL;
|
||||
|
||||
tstate->coroutine_origin_tracking_depth = 0;
|
||||
|
||||
tstate->coroutine_wrapper = NULL;
|
||||
tstate->in_coroutine_wrapper = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue