aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc
diff options
context:
space:
mode:
authorvskipin <vskipin@yandex-team.ru>2022-02-10 16:46:00 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:00 +0300
commit4d8b546b89b5afc08cf3667e176271c7ba935f33 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/grpc
parent4e4b78bd7b67e2533da4dbb9696374a6d6068e32 (diff)
downloadydb-4d8b546b89b5afc08cf3667e176271c7ba935f33.tar.gz
Restoring authorship annotation for <vskipin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/grpc')
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor.cc22
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor.h6
2 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor.cc b/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
index 40e94b79c6..10b2f948ec 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
@@ -85,8 +85,8 @@ const EnqueueFunc
{{default_enqueue_short, default_enqueue_long},
{resolver_enqueue_short, resolver_enqueue_long}};
-size_t threads_limit_ = 0;
-
+size_t threads_limit_ = 0;
+
} // namespace
TraceFlag executor_trace(false, "executor");
@@ -95,17 +95,17 @@ Executor::Executor(const char* name) : name_(name) {
adding_thread_lock_ = GPR_SPINLOCK_STATIC_INITIALIZER;
gpr_atm_rel_store(&num_threads_, 0);
max_threads_ = GPR_MAX(1, 2 * gpr_cpu_num_cores());
- if (threads_limit_) {
- max_threads_ = GPR_MIN(max_threads_, threads_limit_);
- }
+ if (threads_limit_) {
+ max_threads_ = GPR_MIN(max_threads_, threads_limit_);
+ }
+}
+
+size_t Executor::SetThreadsLimit(size_t count) {
+ size_t prev = threads_limit_;
+ threads_limit_ = count;
+ return prev;
}
-size_t Executor::SetThreadsLimit(size_t count) {
- size_t prev = threads_limit_;
- threads_limit_ = count;
- return prev;
-}
-
void Executor::Init() { SetThreading(true); }
size_t Executor::RunClosures(const char* executor_name,
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor.h b/contrib/libs/grpc/src/core/lib/iomgr/executor.h
index 6a51e17532..ae523ff212 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor.h
@@ -103,9 +103,9 @@ class Executor {
// Return if the DEFAULT executor is threaded
static bool IsThreadedDefault();
- // Set the maximum numbers of executor treads
- static size_t SetThreadsLimit(size_t count);
-
+ // Set the maximum numbers of executor treads
+ static size_t SetThreadsLimit(size_t count);
+
private:
static size_t RunClosures(const char* executor_name, grpc_closure_list list);
static void ThreadMain(void* arg);