python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add instrumentation hooks

smurfix opened this issue · comments

Trio-asyncio runs in a separate Trio task. The current instrumentation hooks for Trio capture when that task is running (or not), but not what it's doing internally. Thus I probably need to think about adding a couple of new hooks that report queuing/removing timers/callbacks.

From #37, moved here to consolidate: "Use trio's instrumentation to add some callbacks related to trio_asyncio. Specifically, queuing and executing asyncio handles should be more tractable."

I think instead of adding our own hooks we might want to create one asyncio task per Trio task and vice versa and use coroutine transportation as discussed in #42.