Skip to content

Tracing Threads #118

Answered by ionelmc
tshead2 asked this question in Q&A
Nov 1, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Yeah that is exactly the problem. I went the safe way and didn't mess with trace hooks in live threads, cause I'd have to mess various thread internals to figure out what threads are running and patch their threadstate, and internals seems to change every python release. It was hard enough figuring out how to support python 3.11 (cause I did use some internals) so I'm not keen on the idea of using internals, not anymore, sorry :/

But one thing that could work is starting the trace inside your thread (instead of the main thread). That should get tracing active for that one thread.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tshead2
Comment options

Answer selected by ionelmc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants