信号量优先 [英] Semaphore with priority
本文介绍了信号量优先的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道System.Threading
命名空间中的Semaphore
类,但是我不知道它是否允许等待线程具有不同的优先级.
I know about the Semaphore
class in the System.Threading
namespace, but I don't see if it allows waiting threads to have different priorities levels.
如果两个线程正在等待一个开放的插槽,是否可以让优先级较高的线程拥有第一个开放的插槽?
If two threads are waiting for an open slot, is there a way to allow the thread with the higher priority to have the first open slot available?
推荐答案
查看全文