Forráskód Böngészése

update function name

leon 1 hónapja
szülő
commit
0537e1a32f
1 módosított fájl, 2 hozzáadás és 2 törlés
  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());