fix multi thread use queue.

Signed-off-by: dingxiaochen <dingxiaochen@huawei.com>
This commit is contained in:
dingxiaochen 2024-10-30 11:59:25 +08:00
parent c2f6662f5a
commit 071511fe1e

View File

@ -45,6 +45,7 @@ TelEventQueue::~TelEventQueue()
TELEPHONY_LOGD("%{public}s need to wait", name_.c_str());
queue_->wait(curTask_);
curTask_ = ffrt::task_handle();
std::lock_guard<std::mutex> lock(taskCtx_);
queue_ = nullptr;
}