-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Unsafe.compareAndExchange for writing to Stable field and array
Using Unsafe.compareAndExchange prevents issues resulting from multiple threads coming across uninitialized VarHandle's typesAndInvokers field and competing to populate the field with their own versions. Using compareAndExchange to populate the typesAndInvokers' MethodHandle table also prevents similar issues when multiple threads come across the same unpopulated slot in the MethodHandle table and compete to populate it. Signed-off-by: Nazim Bhuiyan <[email protected]> Co-authored-by: Devin Papineau <[email protected]>
- Loading branch information
Showing
1 changed file
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters