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

[Proposal] Allow inserting a different thread by id with insert_real_time_thread #201

Closed
timpalpant opened this issue Aug 6, 2019 · 0 comments · Fixed by #205
Closed

Comments

@timpalpant
Copy link
Contributor

When using real-time profiling, the signal is delivered (via broadcasting from the main thread) to the thread that called vmprof.enable(). To register additional threads, we can call insert_real_time_thread.

Currently, this function must be called from each thread that wants to be profiled, and then pthread_self is used to get the caller's thread ID.

Can we add an optional argument to the insert_real_time_thread function that allows registering a different thread by passing its id? This would be convenient in situations where it is difficult to get the desired thread to register itself. For example, we would like to be able to register the worker thread of a web server from a separate control interface.

This change would be backwards compatible, since by default (not passing the argument), the current thread ID would still be used.

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