RFR: 8338417: Explicitly pin a virtual thread before acquiring the JFR string pool monitor
Alan Bateman
alanb at openjdk.org
Thu Aug 15 09:48:57 UTC 2024
On Thu, 15 Aug 2024 09:45:20 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> src/jdk.jfr/share/classes/jdk/jfr/internal/StringPool.java line 93:
>>
>>> 91: private static long storeString(String s) {
>>> 92: try {
>>> 93: pinVirtualThread();
>>
>> The pin should be outside the try so that the finally can only happen if pinning was succesful.
>
> Good point, thanks.
Yes, it should only unpin if pin completed successfully.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20588#discussion_r1718199915
More information about the core-libs-dev
mailing list