RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]
    Alan Bateman 
    alanb at openjdk.java.net
       
    Thu Apr 21 11:35:59 UTC 2022
    
    
  
On Tue, 19 Apr 2022 01:11:56 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refresh
>
> src/java.base/share/classes/java/lang/System.java line 2173:
> 
>> 2171: 
>> 2172:         // start Finalizer and Reference Handler threads
>> 2173:         SharedSecrets.getJavaLangRefAccess().startThreads();
> 
> I think it would avoid any confusion if `VM.initLevel(1)` is the last step in `initPhase1`, i.e. call after this line.   Previously, the finalizer starts very early and it has to wait until initLevel is set to level 1 which guarantees that `JavaLangAccess` is available.  With this change, `JavaLangAccess` is already set.
Yes, that would be best, just wasn't possible before now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8166
    
    
More information about the serviceability-dev
mailing list