New submission from Alex Grönholm <alex.gronh...@nextday.fi>:

Both curio and trio expose the coroutine object belonging to a task as the 
"coro" attribute. Asyncio exposes this as "_coro" (as does uvloop) but it would 
be nice to have at least a read-only attribute exposing this as part of the 
public API.

In some of my libraries I need this object, sometimes for debugging and other 
times for implementing "crazy" schemes like running parts of the the coroutine 
function code in a worker thread.

----------
components: asyncio
messages: 343092
nosy: alex.gronholm, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Expose the coroutine object in asyncio task objects
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36999>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to