MCPcopy Create free account
hub / github.com/apache/trafficserver / add

Method add

plugins/experimental/rate_limit/limiter.h:131–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 void refill_thread();
130
131 std::shared_ptr<RateBucket>
132 add(uint32_t max)
133 {
134 auto bucket = std::make_shared<RateBucket>(max);
135 std::lock_guard<std::mutex> lock(_mutex);
136
137 if (!_running) {
138 _running = true;
139 _thread = std::thread(&BucketManager::refill_thread, this);
140 }
141
142 _buckets.push_back(bucket);
143
144 return bucket;
145 }
146
147 void
148 remove(std::shared_ptr<RateBucket> bucket)

Callers 1

addBucketMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected