Skip to content

Add hts_tpool_worker_id() API#1875

Merged
whitwham merged 1 commit intosamtools:developfrom
jkbonfield:region-walk
Jan 28, 2025
Merged

Add hts_tpool_worker_id() API#1875
whitwham merged 1 commit intosamtools:developfrom
jkbonfield:region-walk

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.
@whitwham whitwham merged commit 2578c89 into samtools:develop Jan 28, 2025
9 checks passed
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