From 630a45ed25d1edf37309b842f9109a3283c83be8 Mon Sep 17 00:00:00 2001 From: Fu Juntang <StrongTiger_001@163.com> Date: 星期五, 03 九月 2021 15:34:31 +0800 Subject: [PATCH] Remove the lock to meet the application scenario. --- src/bh_api.cpp | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/bh_api.cpp b/src/bh_api.cpp index 94637ad..5310992 100644 --- a/src/bh_api.cpp +++ b/src/bh_api.cpp @@ -1547,7 +1547,6 @@ return false; } - rv = pthread_mutex_trylock(&mutex); if (rv == 0) { if (timeout_ms > 0) { @@ -1590,8 +1589,6 @@ logger->error("in BHReadRequest: Out of memory!\n"); - pthread_mutex_unlock(&mutex); - return false; } memset(topics_buf, 0x00, size + MIN_STR_LEN); @@ -1629,8 +1626,6 @@ *(int *)buf = key; *src = buf; } - - pthread_mutex_unlock(&mutex); memset(errString, 0x00, sizeof(errString)); strncpy(errString, bus_strerror(rv), sizeof(errString)); -- Gitblit v1.8.0