保证信号量顺序? [英] Guaranteed semaphore order?
本文介绍了保证信号量顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
.NET Semaphore类的文档指出:
The documentation for the .NET Semaphore class states that:
没有保证的顺序(例如FIFO或LIFO),阻止的线程在该顺序中进入信号量.
There is no guaranteed order, such as FIFO or LIFO, in which blocked threads enter the semaphore.
在这种情况下,如果我要保证订单(FIFO或LIFO),我有什么选择?这是不容易做到的吗?我需要编写自己的信号量吗?我认为那会相当先进吗?
In this case, if I want a guaranteed order (either FIFO or LIFO), what are my options? Is this something that just isn't easily possible? Would I have to write my own Semaphore? I assume that would be pretty advanced?
谢谢
史蒂夫
推荐答案
查看全文