On Tue, 30 Jul 2024 08:36:25 GMT, Viktor Klang <vkl...@openjdk.org> wrote:
>> WaitOnAddress is reported to spin before yielding. It might be related. > > @djelinski @dholmes-ora Couldn't it be that the producer thread is already > scheduled, so it can reacquire the monitor whereas if the consumer was parked > then the wake-up "lag" means that statistically it will lose? @viktorklang-ora the question is why the two APIs seems to be behaving so differently. I would expect `WaitForSingleObject` and `WaitOnAddress` to be very similar internally - though speculation on my part. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19778#issuecomment-2262013623