lichao
2021-05-20 68c7bef33e74f23aa0136ccd6f7faa654d671ebc
src/shm_queue.h
@@ -30,7 +30,6 @@
template <class D>
using Circular = boost::circular_buffer<D, Allocator<D>>;
// using Circular = robust::CircularBuffer<D, Allocator<D>>;
template <class D>
class SharedQueue
@@ -47,7 +46,7 @@
         if (TryRead(d)) {
            return true;
         } else {
            robust::QuickSleep();
            std::this_thread::sleep_for(1ms);
         }
      } while (steady_clock::now() < end_time);
      return false;
@@ -76,7 +75,6 @@
private:
   Circular<D> queue_;
   // bhome_shm::Mutex mutex_;
};
template <int Power = 4>
@@ -97,7 +95,7 @@
               return true;
            }
         }
         robust::QuickSleep();
         std::this_thread::sleep_for(1ms);
      } while (steady_clock::now() < end_time);
      return false;
   }