SemaphoreSlim wait without creating a critical section
Hello,
I don't want to have a critical section, instead I should have a section where all threads are blocked until the semaphore is released. When it is released, all threads should start executing the section. For this
semaphore.Wait()
is not good, because threads will execute the section one by one.
The outcome should be: No critical section, just blocking for all threads.
Probably some other object is needed for this use case, but what is that?2 Replies