3 ms·
My last question would be: is it "OK" to use phtread in my code or are there any alternatives (i.e. "best way") when using C17?
by johnisgood 2y ago
My last question would be: is it "OK" to use phtread in my code or are there any alternatives (i.e. "best way") when using C17?
- lifthrasiir 2y agoNo, just use pthread. There are some useful pthread APIs missing from C17 anyway too.
- johnisgood 2y agoThank you for your answers, it is much appreciated. I suppose I will not use "quick_exit" either in that case, I have many workers, there is a job queue mutex, along with phtread_cond_wait and phtread_mutex_{lock,unlock} and when the "job_quit_flag" is set to true, that means all jobs are done and I am ready to return NULL.