소스 검색

update function name

leon 1 개월 전
부모
커밋
0537e1a32f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/common/queue.hpp

+ 2 - 2
src/common/queue.hpp

@@ -22,7 +22,7 @@ public:
         cond_var_.notify_one();
     }
 
-    bool tryPop(T& item) {
+    bool try_pop(T& item) {
         std::lock_guard<std::mutex> lock(mutex_);
         if (queue_.empty()) {
             return false;
@@ -32,7 +32,7 @@ public:
         return true;
     }
 
-    T waitAndPop() {
+    T wait_pop() {
         std::unique_lock<std::mutex> lock(mutex_);
         cond_var_.wait(lock, [this] { return !queue_.empty(); });
         T item = std::move(queue_.front());