Additional function that allows passing pthread_attr_t during thread pool initialization
Closed this issue · 1 comments
vpetrigo commented
Hello,
First of all, I'd like to say thank you for your library.
I want to propose extension of current thread pool initialization process in order to be able to pass pthread attribute to underneath threads which are created in a pool.
It might be done via additional method like:
const pthread_attr_t *internal_pattr_variable = NULL;
//...
void thpool_set_attr(const pthread_attr_t *pattr)
{
internal_pattr_variable = pattr;
}
By doing so we can check whether our internal_pattr_variable
is not NULL
in the thread_init
call and if so, apply the provided attributes to the brand new threads.
If you do not mind I can do that and send a pull request.
Pithikos commented
Closing this due to little traction