Guaranteed semaphore order?

前端 未结 1 473
面向向阳花
面向向阳花 2020-12-20 15:26

The documentation for the .NET Semaphore class states that:

There is no guaranteed order, such as FIFO or LIFO, in which blocked threads enter the sem

1条回答
  •  -上瘾入骨i
    2020-12-20 15:50

    See this:

    The FifoSemaphore works exactly like a normal Semaphore but also guarantees that tokens are served out to acquirers in the order that they manage to acquire the internal lock. The usage of a FifoSemaphore is identical to a Semaphore.

    0 讨论(0)
提交回复
热议问题