aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Muxi Yan <muxi@users.noreply.github.com>2017-11-06 13:43:53 -0800
committerGravatar GitHub <noreply@github.com>2017-11-06 13:43:53 -0800
commit47d843b1adc5e4c7ee1fcac6d581028bfd6633c7 (patch)
treeeddaeb3ab8f364c4b80eeecaab9fc139c39a70ef /src
parent87b19144370fe5a7923e6cf549c48a67631a4145 (diff)
Add comment to self == [GRPCCall self]
Diffstat (limited to 'src')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index f6d9dda80c..b5ab611848 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -113,6 +113,8 @@ static NSString * const kBearerPrefix = @"Bearer ";
@synthesize state = _state;
+ (void)initialize {
+ // Guarantees the code in {} block is invoked only once. See ref at:
+ // https://developer.apple.com/documentation/objectivec/nsobject/1418639-initialize?language=objc
if (self == [GRPCCall self]) {
grpc_init();
callFlags = [NSMutableDictionary dictionary];