src/libtsduck/java/private/tsjniAsyncReport.cpp
//----------------------------------------------------------------------------
// Initialization/completion of the asynchronous logging thread.
//----------------------------------------------------------------------------
Initialization/completion of the asynchronous logging thread.
Initialization / completion of the asynchronous logging thread .
void ts::jni::AsyncReport::asyncThreadStarted()
{
    if (ts::jni::javaVM != nullptr) {
        void* penv = nullptr;
        const jint status = ts::jni::javaVM->AttachCurrentThread(&penv, nullptr);
        if (status == JNI_OK && penv != nullptr) {
            _env_thread = reinterpret_cast<JNIEnv*>(penv);
        }
    }
}
void ts :: jni :: AsyncReport :: asyncThreadStarted ( ) { if ( ts :: jni :: javaVM != nullptr ) { void * penv = nullptr ; const jint status = ts :: jni :: javaVM -> AttachCurrentThread ( & penv , nullptr ) ; if ( status == JNI_OK && penv != nullptr ) { _env_thread = reinterpret_cast < JNIEnv * > ( penv ) ; } } }
Initialization/completion of the asynchronous logging thread.
Initialization / completion of the asynchronous logging thread .
// Attach the logging thread to the Java VM.