Remove __block for synchronized blocks

pull/16190/head
Muxi Yan 6 years ago
parent a37ec5e3e6
commit 16fd5a758c
  1. 2
      src/objective-c/GRPCClient/GRPCCall.m
  2. 2
      src/objective-c/GRPCClient/private/GRPCChannelPool.m
  3. 2
      src/objective-c/GRPCClient/private/GRPCHost.m

@ -564,7 +564,7 @@ const char *kCFStreamVarName = "grpc_cfstream";
}
NSMutableDictionary *headers = _requestHeaders;
__block NSString *fetchedOauth2AccessToken;
NSString *fetchedOauth2AccessToken;
@synchronized(self) {
fetchedOauth2AccessToken = _fetchedOauth2AccessToken;
}

@ -190,7 +190,7 @@ extern const char *kCFStreamVarName;
}
- (GRPCChannel *)channelWithConfiguration:(GRPCChannelConfiguration *)configuration {
__block GRPCChannel *channel;
GRPCChannel *channel;
@synchronized(self) {
if ([_channelPool objectForKey:configuration]) {
channel = _channelPool[configuration];

@ -141,7 +141,7 @@ static NSMutableDictionary *gHostCache;
host = [hostURL.host stringByAppendingString:@":443"];
}
__block GRPCCallOptions *callOptions = nil;
GRPCCallOptions *callOptions = nil;
@synchronized(gHostCache) {
if ([gHostCache objectForKey:host]) {
callOptions = [gHostCache[host] callOptions];

Loading…
Cancel
Save