resource_quota.cc
Go to the documentation of this file.
1 // Copyright 2021 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 
18 
19 namespace grpc_core {
20 
23  thread_quota_(MakeRefCounted<ThreadQuota>()) {}
24 
26 
28  static auto default_resource_quota =
29  MakeResourceQuota("default_resource_quota").release();
30  return default_resource_quota->Ref();
31 }
32 
33 } // namespace grpc_core
grpc_core::MakeRefCounted
RefCountedPtr< T > MakeRefCounted(Args &&... args)
Definition: ref_counted_ptr.h:335
grpc_core
Definition: call_metric_recorder.h:31
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
setup.name
name
Definition: setup.py:542
grpc_core::RefCountedPtr::release
T * release()
Definition: ref_counted_ptr.h:140
grpc_core::MakeMemoryQuota
MemoryQuotaRefPtr MakeMemoryQuota(std::string name)
Definition: memory_quota.h:456
grpc_core::ResourceQuota::~ResourceQuota
~ResourceQuota() override
grpc_core::RefCountedPtr< ResourceQuota >
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
grpc_core::ResourceQuota::Default
static ResourceQuotaRefPtr Default()
Definition: resource_quota.cc:27
resource_quota.h
memory_quota_
MemoryQuotaRefPtr memory_quota_
Definition: chttp2_server.cc:282
grpc_core::MakeResourceQuota
ResourceQuotaRefPtr MakeResourceQuota(std::string name)
Definition: src/core/lib/resource_quota/resource_quota.h:68
grpc_core::ThreadQuota
Definition: thread_quota.h:32
grpc_core::ResourceQuota::ResourceQuota
ResourceQuota(std::string name)
Definition: resource_quota.cc:21
std
Definition: grpcpp/impl/codegen/async_unary_call.h:407
grpc_core::RefCounted::Ref
RefCountedPtr< Child > Ref() GRPC_MUST_USE_RESULT
Definition: ref_counted.h:287
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:04