MCPcopy Create free account
hub / github.com/Snapchat/Valdi / jniNativeThreadEntryPoint

Function jniNativeThreadEntryPoint

valdi/src/valdi/jni/JavaThread.cpp:64–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62JavaThread::~JavaThread() = default;
63
64void jniNativeThreadEntryPoint(JNIEnv* /*env*/, jclass /*cls*/, jlong ptr) {
65 // Retain for the duration of handler(), mirroring threadEntryPoint() in Thread.cpp.
66 // Tearing down a ThreadedDispatchQueue from its own thread drops the owning Ref<Thread>
67 // mid-task; without this retain, ~Thread() destroys the still-executing runnable and its
68 // captured Ref<TaskQueue>, and TaskQueue::runNextTask then re-locks an already-destroyed
69 // mutex.
70 Valdi::Ref<Valdi::Thread> thread(reinterpret_cast<Valdi::Thread*>(ptr));

Callers

nothing calls this directly

Calls 1

handlerMethod · 0.45

Tested by

no test coverage detected