Skip to content

Commit

Permalink
Set scoped value bindings for newly-created thread
Browse files Browse the repository at this point in the history
Related: eclipse-openj9/openj9#17402
eclipse-openj9/openj9#16677

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
  • Loading branch information
thallium and babsingh committed Aug 18, 2023
1 parent 440eb6c commit 6f920d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/java.base/share/classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2021, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2021, 2023 All Rights Reserved
* ===========================================================================
*/

Expand Down Expand Up @@ -3189,6 +3189,9 @@ private Thread(String vmName, Object vmThreadGroup, int vmPriority, boolean vmIs
setNameImpl(eetop, "main");
System.completeInitialization();
}

// special value to indicate this is a newly-created Thread
this.scopedValueBindings = NEW_THREAD_BINDINGS;
}

private boolean isDead() {
Expand Down

0 comments on commit 6f920d8

Please sign in to comment.