python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio
Other
189 stars 38 forks source link

Add instrumentation hooks #20

Open smurfix opened 6 years ago

smurfix commented 6 years ago

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.

oremanj commented 4 years ago

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.