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

Thread pool #138

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Thread pool #138

wants to merge 8 commits into from

Conversation

charlesgregory
Copy link
Contributor

This PR adds wrappers around htsThreadPool and hts_tpool. The goal would be to allow parallel, in-order execution of arbitrary functions. These jobs could be added directly to the same thread pools that are used for reading and writing files.

@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #138 (52bd495) into develop (b7af040) will increase coverage by 0.41%.
The diff coverage is 98.38%.

❗ Current head 52bd495 differs from pull request most recent head 2b943f9. Consider uploading reports for the commit 2b943f9 to get more accurate results

@@             Coverage Diff             @@
##           develop     #138      +/-   ##
===========================================
+ Coverage    83.37%   83.78%   +0.41%     
===========================================
  Files           45       46       +1     
  Lines         4823     4945     +122     
===========================================
+ Hits          4021     4143     +122     
  Misses         802      802              
Impacted Files Coverage Δ
source/htslib/bgzf.d 100.00% <ø> (ø)
source/dhtslib/threadpool.d 97.59% <97.59%> (ø)
source/dhtslib/file/file.d 92.45% <100.00%> (+1.31%) ⬆️
source/dhtslib/file/iterator.d 96.33% <100.00%> (ø)
source/dhtslib/memory.d 74.07% <100.00%> (+0.99%) ⬆️
source/htslib/kstring.d 63.00% <100.00%> (+2.58%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jblachly
Copy link
Member

What is the use case? I may not be qualified to comment on this 🤯

source/dhtslib/file/iterator.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/dhtslib/threadpool.d Show resolved Hide resolved
source/htslib/bgzf.d Outdated Show resolved Hide resolved
@@ -199,6 +199,13 @@ void ks_free(kstring_t* s)
}
}

kstring_t* ks_dup(kstring_t* s) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly is not a part of kstring.h or kstring.c ; will this make it more difficult to keep your file in sync with upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have the diff system, probably not. Though I should update the diffs considering I have new changes that need to carry forward.

Though I also thought that kstring already had a dup function and was surprised to find that it didn't.

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.

None yet

2 participants