Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can the main thread sleep without causing all threads to sleep?

causing main sleep thread threads
0
Posted

Can the main thread sleep without causing all threads to sleep?

0

> If a main() creates mutiple threads that are off executing their > specified routines, can the “main()” thread then all sleep(3) with_out_ > causing any of the threads to sleep? > > Esentially: > 1) create and start threads > 2) sleep (yourself) while threads do ob > 3) wake up and stop the threads, clean-up, and end execution > > I have looked in /usr/include/unistd.h and at the Single Unix Spec but > am not sure of the behavior You’re asking two separate questions. Reference to the Single UNIX Specification (version 2, which includes threads; aka UNIX 98) is really off topic if you’re interested in Linux, because Linux bears only vague and incomplete similarities to UNIX 98. (Especially when you get to threads.) In terms of UNIX 98 conformance, LinuxThreads is full of large and serious bugs. (Though this is a pointless and somewhat unfair criticism because no aspect of Linux actually claims “conformance”… rather, the code strives to be compatible where that’s practical. This is a

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123