I have several threads which act as backup for the main one spending most of their life blocked by sem_wait()
. Is it OK to keep them or is it better to spawn new threads only when they need to do actual work? Does kernel switch to threads waiting on sem_wait()
and "waste" CPU cycles?
Thanks.