From 6d5c00b8ebeb5b849deeeb8642f79abca4e14fe6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 12 Jun 2015 21:28:24 +0900 Subject: [PATCH] nghttpx: Use vector for WorkerEvent queue --- src/shrpx_worker.cc | 2 +- src/shrpx_worker.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shrpx_worker.cc b/src/shrpx_worker.cc index a9bf6e65..9074b91e 100644 --- a/src/shrpx_worker.cc +++ b/src/shrpx_worker.cc @@ -119,7 +119,7 @@ void Worker::send(const WorkerEvent &event) { } void Worker::process_events() { - std::deque q; + std::vector q; { std::lock_guard g(m_); q.swap(q_); diff --git a/src/shrpx_worker.h b/src/shrpx_worker.h index 47213710..7a7a4e9e 100644 --- a/src/shrpx_worker.h +++ b/src/shrpx_worker.h @@ -28,7 +28,6 @@ #include "shrpx.h" #include -#include #include #include #ifndef NOTHREADS @@ -117,7 +116,7 @@ private: std::future fut_; #endif // NOTHREADS std::mutex m_; - std::deque q_; + std::vector q_; ev_async w_; ev_timer mcpool_clear_timer_; MemchunkPool mcpool_;