What will happen if more than one threads throws exception in a semaphore.
Suppose a sempahore can have 10 threads those can enter at a time and thread# 2,5,6,7,9 will throw exception then will other threads which will not throw exception run successfully or they get aborted.
Is it somehow related to AggregatedException class.
Assuming the other threads are already inside the semaphore when the exception occurs, they will run successfully to completion. If you want them to terminate early, use a SemaphoreSlim object with a cancellation token.