internal JvmThreadInfo GetThreadInfo(JvmThreadReference thread, JNIEnvHandle jniEnv) { jvmtiThreadInfo info; ThrowOnFailure(_rawInterface.GetThreadInfo(_env, (jthread)thread, out info)); return(new JvmThreadInfo(this, jniEnv, info, true)); }
public jvmtiError GetThreadInfo(JvmVirtualMachineRemoteHandle virtualMachine, JvmThreadRemoteHandle thread, out JvmThreadRemoteInfo info) { JavaVM machine = JavaVM.GetInstance(virtualMachine); jvmtiThreadInfo threadInfo = default(jvmtiThreadInfo); jvmtiError result = jvmtiError.Internal; machine.InvokeOnJvmThread( (environment) => { jvmtiInterface rawInterface = environment.RawInterface; result = rawInterface.GetThreadInfo(environment.Handle, thread, out threadInfo); }); info = new JvmThreadRemoteInfo() { Name = threadInfo.Name, Priority = threadInfo._priority, IsDaemon = threadInfo._isDaemon != 0, ContextClassLoader = new JvmObjectRemoteHandle(threadInfo._contextClassLoader), ThreadGroup = new JvmThreadGroupRemoteHandle(threadInfo._threadGroup) }; return(result); }