RFR: 8255582: Introduce SemaphoreLock and SemaphoreLocker
Stefan Karlsson
stefank at openjdk.java.net
Thu Oct 29 10:26:53 UTC 2020
On Thu, 29 Oct 2020 10:01:22 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> Semaphores can be used as low-level locks, but the readability of the code using them could be better. I propose that we introduce two new classes:
>
> SemaphoreLock - which provides the operations lock, unlock, try_lock.
>
> SemaphoreLocker - Equivalent to MutexLocker.
I intend to use this in https://github.com/openjdk/jdk/pull/903
-------------
PR: https://git.openjdk.java.net/jdk/pull/927
More information about the hotspot-runtime-dev
mailing list