未验证 提交 be55e7ec 编写于 作者: D dengyutao 提交者: Gitee

update ipc/native/src/core/source/ipc_thread_pool.cpp.

Signed-off-by: Ndengyutao <dengyutao2@huawei.com>
上级 b5677c1d
......@@ -149,12 +149,14 @@ void IPCWorkThreadPool::UpdateMaxThreadNum(int maxThreadNum)
void IPCWorkThreadPool::BlockUntilThreadAvailable()
{
ZLOGD(LOG_LABEL, "BlockUntilThreadAvailable enter");
std::unique_lock<std::mutex> lock(mutex_);
numWaitingForThreads_++;
while (idleThreadNum_ <= 0) {
cv_.wait(lock);
}
numWaitingForThreads_--;
ZLOGD(LOG_LABEL, "BlockUntilThreadAvailable exit");
}
#ifdef CONFIG_IPC_SINGLE
} // namespace IPC_SINGLE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册