سؤال

I have a C process creating several pThreads. To sleep and wake the threads up I am using pThread conditions. However, I want to sleep the POSIX process in such a way that pThreads can wake it up. How can I do it?

هل كانت مفيدة؟

المحلول

If you're just referring to the initial thread in a multithreaded process (the one that begins at main()), then it's a thread much like any other, and can use the normal pthreads synchronisation primitives.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top