RFR: 8351927: Change VirtualThread implementation to use use FJP delayed task handling

Viktor Klang vklang at openjdk.org
Wed Apr 9 08:06:33 UTC 2025


On Wed, 9 Apr 2025 05:56:28 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/VirtualThread.java line 889:
>> 
>>> 887:     private void parkTimeoutExpired() {
>>> 888:         assert !VirtualThread.currentThread().isVirtual();
>>> 889:         if (!getAndSetParkPermit(true)
>> 
>> @AlanBateman Would it make sense to test whether the park-permit is false before the LOCK XCHG?
>
> It already does, no CAS if the current value is the new value.

I meant the park permit. :)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24030#discussion_r2034736102


More information about the serviceability-dev mailing list