Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve repr of greenlets #215

Closed
jamadden opened this issue Nov 19, 2020 · 1 comment · Fixed by #216
Closed

Improve repr of greenlets #215

jamadden opened this issue Nov 19, 2020 · 1 comment · Fixed by #216

Comments

@jamadden
Copy link
Contributor

There's some possibly useful information that could be included in the default repr:

  • Is it dead?
  • Is it current?
  • Is it the main greenlet?
  • What thread ID is it attached to? (There have been some recent changes to Python thread IDs, IIRC, that might make that more interesting).
@jamadden
Copy link
Contributor Author

I wasn't able to determine a cheap way to get any thread ID that would be meaningful to a user without using additional storage. We could print the ID of the thread state dictionary, and users could associate greenlets that are in the same thread that way, but it wouldn't tell them anything about the Python level thread. I'm not sure if that's helpful or not, so in the absence of feedback I'm leaning towards putting it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant