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

Add hts_tpool_worker_id() API #1875

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jkbonfield
Copy link
Contributor

This returns a numeric value from 0 to nthreads-1 corresponding to the current running thread, or -1 if unthreaded or the thread does not correspond to one allocated to this pool.

It may be used to associate data to a thread rather than to a job. For example maintaining one open file handle per thread spawned.

This returns a numeric value from 0 to nthreads-1 corresponding to the
current running thread, or -1 if unthreaded or the thread does not
correspond to one allocated to this pool.

It may be used to associate data to a thread rather than to a job.
For example maintaining one open file handle per thread spawned.
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 this pull request may close these issues.

2 participants