0

I am working on a windows system. I have a main thread from which I start few threads.The new threads do the processing.Now my main thread waits on WaitForMultipleObjects(). So is my main thread also allocated cpu on regular interval?Or as it is on wait the other threads share cpu?

Sayantan Ghosh
  • 998
  • 2
  • 9
  • 29

1 Answers1

0

(Slightly different) Duplicate: Does WaitForSingleObject give up a thread's time slice?

"[No] -- the thread is blocked until whatever it's waiting on becomes signaled. The thread won't be scheduled to run while it's blocked, so other threads get all the CPU time."

Community
  • 1
  • 1
Vivek Chavda
  • 473
  • 1
  • 4
  • 16