mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-06 18:18:52 +08:00
nghttpx: Use vector for WorkerEvent queue
This commit is contained in:
@@ -119,7 +119,7 @@ void Worker::send(const WorkerEvent &event) {
|
||||
}
|
||||
|
||||
void Worker::process_events() {
|
||||
std::deque<WorkerEvent> q;
|
||||
std::vector<WorkerEvent> q;
|
||||
{
|
||||
std::lock_guard<std::mutex> g(m_);
|
||||
q.swap(q_);
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "shrpx.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#ifndef NOTHREADS
|
||||
@@ -117,7 +116,7 @@ private:
|
||||
std::future<void> fut_;
|
||||
#endif // NOTHREADS
|
||||
std::mutex m_;
|
||||
std::deque<WorkerEvent> q_;
|
||||
std::vector<WorkerEvent> q_;
|
||||
ev_async w_;
|
||||
ev_timer mcpool_clear_timer_;
|
||||
MemchunkPool mcpool_;
|
||||
|
||||
Reference in New Issue
Block a user