Skip to content

Commit e5d3b3d

Browse files
committed
Sync c-core 1.70.2
1 parent caa830c commit e5d3b3d

File tree

11 files changed

+27
-18
lines changed

11 files changed

+27
-18
lines changed

gRPC-C++.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Pod::Spec.new do |s|
2323
s.name = 'gRPC-C++'
2424
# TODO (mxyan): use version that match gRPC version when pod is stabilized
25-
version = '1.70.0'
25+
version = '1.70.2'
2626
s.version = version
2727
s.summary = 'gRPC C++ library'
2828
s.homepage = 'https://grpc.io'

gRPC-Core.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
Pod::Spec.new do |s|
2323
s.name = 'gRPC-Core'
24-
version = '1.70.0'
24+
version = '1.70.2'
2525
s.version = version
2626
s.summary = 'Core cross-platform gRPC library, written in C'
2727
s.homepage = 'https://grpc.io'

gRPC-ProtoRPC.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
Pod::Spec.new do |s|
2323
s.name = 'gRPC-ProtoRPC'
24-
version = '1.70.0'
24+
version = '1.70.2'
2525
s.version = version
2626
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
2727
s.homepage = 'https://grpc.io'

gRPC-RxLibrary.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
Pod::Spec.new do |s|
2323
s.name = 'gRPC-RxLibrary'
24-
version = '1.70.0'
24+
version = '1.70.2'
2525
s.version = version
2626
s.summary = 'Reactive Extensions library for iOS/OSX.'
2727
s.homepage = 'https://grpc.io'

gRPC.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
Pod::Spec.new do |s|
2222
s.name = 'gRPC'
23-
version = '1.70.0'
23+
version = '1.70.2'
2424
s.version = version
2525
s.summary = 'gRPC client library for iOS/OSX'
2626
s.homepage = 'https://grpc.io'

include/grpcpp/version_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
#define GRPC_CPP_VERSION_MAJOR 1
2222
#define GRPC_CPP_VERSION_MINOR 70
23-
#define GRPC_CPP_VERSION_PATCH 0
23+
#define GRPC_CPP_VERSION_PATCH 2
2424
#define GRPC_CPP_VERSION_TAG ""
25-
#define GRPC_CPP_VERSION_STRING "1.70.0"
25+
#define GRPC_CPP_VERSION_STRING "1.70.2"
2626

2727
#endif // GRPCPP_VERSION_INFO_H

src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,17 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
396396
// reduce the check rate if the pool is idle.
397397
if (pool_->IsShutdown()) {
398398
if (pool_->IsQuiesced()) break;
399-
} else {
400-
lifeguard_should_shut_down_->WaitForNotificationWithTimeout(
401-
absl::Milliseconds(backoff_.NextAttemptDelay().millis()));
399+
if (MaybeStartNewThread()) {
400+
// A new thread needed to be spawned to handle the workload.
401+
// Wait just a small while before checking again to prevent a busy loop.
402+
backoff_.Reset();
403+
}
404+
// Sleep for a bit.
405+
pool_->work_signal()->WaitWithTimeout(backoff_.NextAttemptDelay());
406+
continue;
402407
}
408+
lifeguard_should_shut_down_->WaitForNotificationWithTimeout(
409+
absl::Milliseconds(backoff_.NextAttemptDelay().millis()));
403410
MaybeStartNewThread();
404411
}
405412
lifeguard_running_.store(false, std::memory_order_relaxed);
@@ -423,11 +430,11 @@ WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::~Lifeguard() {
423430
lifeguard_is_shut_down_ = std::make_unique<grpc_core::Notification>();
424431
}
425432

426-
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
433+
bool WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
427434
MaybeStartNewThread() {
428435
// No new threads are started when forking.
429436
// No new work is done when forking needs to begin.
430-
if (pool_->forking_.load()) return;
437+
if (pool_->forking_.load()) return false;
431438
const auto living_thread_count = pool_->living_thread_count()->count();
432439
// Wake an idle worker thread if there's global work to be had.
433440
if (pool_->busy_thread_count()->count() < living_thread_count) {
@@ -436,7 +443,7 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
436443
backoff_.Reset();
437444
}
438445
// Idle threads will eventually wake up for an attempt at work stealing.
439-
return;
446+
return false;
440447
}
441448
// No new threads if in the throttled state.
442449
// However, all workers are busy, so the Lifeguard should be more
@@ -446,7 +453,7 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
446453
pool_->last_started_thread_) <
447454
kTimeBetweenThrottledThreadStarts) {
448455
backoff_.Reset();
449-
return;
456+
return false;
450457
}
451458
// All workers are busy and the pool is not throttled. Start a new thread.
452459
// TODO(hork): new threads may spawn when there is no work in the global
@@ -458,6 +465,7 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
458465
pool_->StartThread();
459466
// Tell the lifeguard to monitor the pool more closely.
460467
backoff_.Reset();
468+
return true;
461469
}
462470

463471
// -------- WorkStealingThreadPool::ThreadState --------

src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ class WorkStealingThreadPool final : public ThreadPool {
159159
// The main body of the lifeguard thread.
160160
void LifeguardMain();
161161
// Starts a new thread if the pool is backlogged
162-
void MaybeStartNewThread();
162+
// Return true if a new thread was started.
163+
bool MaybeStartNewThread();
163164

164165
WorkStealingThreadPoolImpl* pool_;
165166
grpc_core::BackOff backoff_;

src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
4242
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
4343
# before them.
4444
s.name = '!ProtoCompiler-gRPCCppPlugin'
45-
v = '1.70.0'
45+
v = '1.70.2'
4646
s.version = v
4747
s.summary = 'The gRPC ProtoC plugin generates C++ files from .proto services.'
4848
s.description = <<-DESC

src/objective-c/!ProtoCompiler-gRPCPlugin.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
4242
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
4343
# before them.
4444
s.name = '!ProtoCompiler-gRPCPlugin'
45-
v = '1.70.0'
45+
v = '1.70.2'
4646
s.version = v
4747
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
4848
s.description = <<-DESC

0 commit comments

Comments
 (0)