From 677ab86b4a8567197550d6969a4d5bd76b8206e1 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 17 Oct 2018 10:33:38 -0700 Subject: [PATCH] rename createChannel -> createChannelCallback --- src/objective-c/GRPCClient/private/GRPCChannel.m | 8 ++++---- src/objective-c/GRPCClient/private/GRPCChannelPool.h | 2 +- src/objective-c/GRPCClient/private/GRPCChannelPool.m | 4 ++-- 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 2274fa5d6ab..bea75d25a98 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 5ceb0b6d821..48c35eacb01 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 11c9d4be8dd..680b268dcfa 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]