On Tue, 20 Oct 2020 12:06:57 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Yes, that would be good. > > Why don't you just do: > JavaThread* java_thread = JavaThread::current(); > HandleMark hm(java_thread); > > JavaThread::current is the same thing as what you have. Hi Coleen, we are in a handshake. Target java_thread must be treat as different from current thread. It can be same, but also another thread java thread or VM thread. So we only know the the thread executing is a Thread, but our target is a JavaThread. Here we want to create a HandleMark in current thread. Then we want a JavaThread pointer to the target for later use. Does that explain it? ------------- PR: https://git.openjdk.java.net/jdk/pull/729