fix: Fix Frame Processor SIGSEV crash in VisionCameraScheduler::trigger by locking mutex in dispatchAsync (#2591)

Add missing lock.
This commit is contained in:
bglgwyng 2024-02-20 00:01:21 +09:00 committed by GitHub
parent 7ac6f4d008
commit 55992bb954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ TSelf JVisionCameraScheduler::initHybrid(jni::alias_ref<jhybridobject> jThis) {
}
void JVisionCameraScheduler::dispatchAsync(const std::function<void()>& job) {
std::unique_lock<std::mutex> lock(_mutex);
// 1. add job to queue
_jobs.push(job);
scheduleTrigger();