On Mon, 19 Dec 2022 12:27:08 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> @dholmes-ora
>> Thank you for looking at this fix and for the comments.
>> I will on replying and resolving them.
>
> This update just follows the common pattern which was introduced about two 
> years ago. At the moment I do not remember the exact reason. This code needs 
> to wait for the counter to become zero and to use `ThreadBlockInVM` which can 
> reach a safepoint in the destructor. Can we lock with a safepoint check in 
> this case? Or we should get rid of the `ThreadBlockInVM` then?
> I'll check if this can be fixed.

This can be a separate RFE if the reason for it being a nosafepoint lock no 
longer holds. It would be cleaner to use a normal safepoint checking lock than 
to artificially make the thread safepoint-safe before using it.

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

PR: https://git.openjdk.org/jdk/pull/11690

Reply via email to