I had a requirement to allocate the resource to the number of threads, so I used semaphores to handle all this, then I realized that the semaphore is used in case of blocking Interprocess resources. I googled and found some implementation of In-Process Semaphore and used this class, but it has some strange errors.
Now my question is: should I use the Dot Net semaphore class? and in any case, I can create a semaphore in the process and reduce the cost of interprocess (internal management)
source share