aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-17 10:33:38 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-17 11:41:59 -0700
commit677ab86b4a8567197550d6969a4d5bd76b8206e1 (patch)
tree410303f6209968cdac92cc5a9f5c53c95ad96ef7 /src/objective-c/GRPCClient
parentda42aa1c1ba38a12450e6b75b20281d6603b3d7e (diff)
rename createChannel -> createChannelCallback
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m8
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannelPool.h2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannelPool.m4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 2274fa5d6a..bea75d25a9 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -116,10 +116,10 @@ static GRPCChannelPool *gChannelPool;
GRPCChannelConfiguration *channelConfig =
[[GRPCChannelConfiguration alloc] initWithHost:host callOptions:callOptions];
return [gChannelPool channelWithConfiguration:channelConfig
- createChannel:^{
- return
- [GRPCChannel createChannelWithConfiguration:channelConfig];
- }];
+ createChannelCallback:^{
+ return
+ [GRPCChannel createChannelWithConfiguration:channelConfig];
+ }];
}
+ (void)closeOpenConnections {
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.h b/src/objective-c/GRPCClient/private/GRPCChannelPool.h
index 5ceb0b6d82..48c35eacb0 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannelPool.h
+++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.h
@@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
* createChannel then add it in the pool. If the channel exists, increase its reference count.
*/
- (GRPCChannel *)channelWithConfiguration:(GRPCChannelConfiguration *)configuration
- createChannel:(GRPCChannel * (^)(void))createChannel;
+ createChannelCallback:(GRPCChannel * (^)(void))createChannelCallback;
/** Decrease a channel's refcount. */
- (void)unrefChannelWithConfiguration:configuration;
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.m b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
index 11c9d4be8d..680b268dcf 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannelPool.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
@@ -338,14 +338,14 @@ const NSTimeInterval kChannelDestroyDelay = 30;
}
- (GRPCChannel *)channelWithConfiguration:(GRPCChannelConfiguration *)configuration
- createChannel:(GRPCChannel * (^)(void))createChannel {
+ createChannelCallback:(GRPCChannel * (^)(void))createChannelCallback {
__block GRPCChannel *channel;
dispatch_sync(_dispatchQueue, ^{
if ([self->_channelPool objectForKey:configuration]) {
[self->_callRefs[configuration] refChannel];
channel = self->_channelPool[configuration];
} else {
- channel = createChannel();
+ channel = createChannelCallback();
self->_channelPool[configuration] = channel;
GRPCChannelCallRef *callRef = [[GRPCChannelCallRef alloc]