You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/01/08 00:46:09 UTC
[trafficserver] branch master updated: Make H2 stream counters
atomic
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new cf1426b Make H2 stream counters atomic
cf1426b is described below
commit cf1426b612a656135388804f22dfeb5fe8864d81
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri Dec 21 12:33:28 2018 +0900
Make H2 stream counters atomic
---
proxy/http2/Http2ConnectionState.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index ef94a93..c2eea39 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -23,6 +23,7 @@
#pragma once
+#include <atomic>
#include "HTTP2.h"
#include "HPACK.h"
#include "Http2Stream.h"
@@ -304,16 +305,16 @@ private:
Queue<Http2Stream> stream_list;
Http2StreamId latest_streamid_in = 0;
Http2StreamId latest_streamid_out = 0;
- int stream_requests = 0;
+ std::atomic<int> stream_requests = 0;
// Counter for current active streams which is started by client
- uint32_t client_streams_in_count = 0;
+ std::atomic<uint32_t> client_streams_in_count = 0;
// Counter for current acive streams which is started by server
- uint32_t client_streams_out_count = 0;
+ std::atomic<uint32_t> client_streams_out_count = 0;
// Counter for current active streams and streams in the process of shutting down
- uint32_t total_client_streams_count = 0;
+ std::atomic<uint32_t> total_client_streams_count = 0;
// NOTE: Id of stream which MUST receive CONTINUATION frame.
// - [RFC 7540] 6.2 HEADERS