mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
implement JavaVM::AttachCurrentThreadAsDaemon
This commit is contained in:
parent
4566e7a7dd
commit
82d2be8e71
@ -41,6 +41,19 @@ AttachCurrentThread(Machine* m, Thread** t, void*)
|
||||
return 0;
|
||||
}
|
||||
|
||||
jint JNICALL
|
||||
AttachCurrentThreadAsDaemon(Machine* m, Thread** t, void* parameters)
|
||||
{
|
||||
*t = static_cast<Thread*>(m->localThread->get());
|
||||
if (*t == 0) {
|
||||
AttachCurrentThread(m, t, parameters);
|
||||
|
||||
ENTER(*t, Thread::ActiveState);
|
||||
setDaemon(*t, (*t)->javaThread, true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
jint JNICALL
|
||||
DetachCurrentThread(Machine* m)
|
||||
{
|
||||
@ -1902,6 +1915,7 @@ populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable)
|
||||
|
||||
vmTable->DestroyJavaVM = DestroyJavaVM;
|
||||
vmTable->AttachCurrentThread = AttachCurrentThread;
|
||||
vmTable->AttachCurrentThreadAsDaemon = AttachCurrentThreadAsDaemon;
|
||||
vmTable->DetachCurrentThread = DetachCurrentThread;
|
||||
vmTable->GetEnv = GetEnv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user