Answered by:
critical section block

Question
-
can anyone please tell, maximum number of threads,that can wait before critical section block?
Thanks in advance..
Friday, October 19, 2012 5:31 AM
Answers
-
I do not think there is a limit on the number of threads that will block.
If there was, then the whole purpose of a critical section is defeated.
You can use TryEnterCriticalSection if you do not want to block on a critical section.
«_Superman_»
Microsoft MVP (Visual C++)
Polymorphism in C- Edited by «_Superman_» Friday, October 19, 2012 6:27 AM
- Proposed as answer by Elegentin Xie Monday, October 22, 2012 6:52 AM
- Marked as answer by Elegentin Xie Friday, October 26, 2012 5:06 AM
Friday, October 19, 2012 6:17 AM
All replies
-
Only one thread will be allowed to enter a critical section.
All other threads will block.
«_Superman_»
Microsoft MVP (Visual C++)
Polymorphism in C- Proposed as answer by Renjith V Ramachandran Friday, October 19, 2012 9:15 AM
Friday, October 19, 2012 5:34 AM -
How many threads can wait while one thread inside the critical section.Friday, October 19, 2012 6:09 AM
-
I do not think there is a limit on the number of threads that will block.
If there was, then the whole purpose of a critical section is defeated.
You can use TryEnterCriticalSection if you do not want to block on a critical section.
«_Superman_»
Microsoft MVP (Visual C++)
Polymorphism in C- Edited by «_Superman_» Friday, October 19, 2012 6:27 AM
- Proposed as answer by Elegentin Xie Monday, October 22, 2012 6:52 AM
- Marked as answer by Elegentin Xie Friday, October 26, 2012 5:06 AM
Friday, October 19, 2012 6:17 AM