Title says it all. Is there anything wrong with await Task.Run(() => semaphore.WaitOne());? System.Threading.Semaphore isn\'t thread-affine, so
You can use a SemaphoreSlim(0, 1) WITH your Semaphore , and WaitAsync before waiting for your original semaphore. This would ensure that for each process, only one thread is blocked waiting for the original Semaphore, and the others, while (a)waiting for WaitAsync, is not blocked.
Another solution is to use the exclusive scheduler of ConcurrentExclusiveSchedulerPair.