Skip to content

Are coroutines supported? #267

Answered by godlygeek
aleGpereira asked this question in Q&A
Discussion options

You must be logged in to vote

Coroutines are supported, but the way they are reported may be surprising. Internally, the way that coroutines work is by yielding control back to an event loop when control is yielded from one coroutine to another, so in the implementation, coroutines are directly called by the event loop. The stacks that Memray shows for coroutines reflect that reality. Our flame graphs may not show which coroutine awaited another coroutine, and can instead show which runner ran each coroutine. This accurately reflects the reality of how coroutines get run, but the lack of context about why the runner is running a particular coroutine can make it hard to reason about the reports.

For instance, this flam…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@papb
Comment options

@godlygeek
Comment options

@papb
Comment options

Answer selected by aleGpereira
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants