mirror of
https://gitee.com/openharmony/communication_ipc
synced 2024-12-04 06:03:18 +00:00
fix: optimize judging comdition
Signed-off-by: jwx1282937 <jialinbo@huawei.com>
This commit is contained in:
parent
c101e3f0c9
commit
868b42d23f
@ -66,7 +66,8 @@ static void ThreadContextDestructor(int32_t proto)
|
||||
pthread_mutex_lock(&threadPool->lock);
|
||||
if (proto == IF_PROT_BINDER) {
|
||||
++threadPool->idleThreadNum;
|
||||
} else if (proto == IF_PROT_DATABUS) {
|
||||
}
|
||||
if (proto == IF_PROT_DATABUS) {
|
||||
++threadPool->idleSocketThreadNum;
|
||||
}
|
||||
pthread_mutex_unlock(&threadPool->lock);
|
||||
@ -174,7 +175,8 @@ int32_t SpawnNewThread(ThreadPool *threadPool, int32_t policy, int32_t proto)
|
||||
pthread_detach(threadId);
|
||||
if (proto == IF_PROT_BINDER) {
|
||||
--threadPool->idleThreadNum;
|
||||
} else if (proto == IF_PROT_DATABUS) {
|
||||
}
|
||||
if (proto == IF_PROT_DATABUS) {
|
||||
--threadPool->idleSocketThreadNum;
|
||||
}
|
||||
pthread_mutex_unlock(&threadPool->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user