On Wed, 9 Mar 2022 20:25:02 GMT, Johannes Bechberger <d...@openjdk.java.net> 
wrote:

> Interesting. But I would nonetheless create an assertion that checks that 
> there is no nesting in the case without a Thread object. I would this using a 
> thread local nesting counter in the ThreadWXEnable class (incremented in the 
> constructor and decremented in the destructor).

Hmm, yes. And the assert would need to check the native thread still don't have 
a Thread object, i.e. the either Thread or TLS is used for tracking. This looks 
rather complicated, I agree.

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

PR: https://git.openjdk.java.net/jdk/pull/7727

Reply via email to