Priority semaphore

I know about a class Semaphorein the namespace System.Threading, but I don’t see if it allows expectations to have different priority levels.

If two threads are waiting for an open slot, is there a way to allow a higher priority thread to have the first open slot?

+1
source share
1 answer

From the MSDN documentation in the Semaphore class

There is no guaranteed order, for example FIFO or LIFO, in which flows are blocked enter a semaphore.

But look at these two projects that maintain priority for threads.

Smart thread pool

Streaming Priority Queue in C #

+2
source

All Articles