Fu Juntang
2021-09-03 630a45ed25d1edf37309b842f9109a3283c83be8
Remove the lock to meet the application scenario.
1个文件已修改
5 ■■■■■ 已修改文件
src/bh_api.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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));