diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2017-11-06 13:43:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 13:43:53 -0800 |
commit | 47d843b1adc5e4c7ee1fcac6d581028bfd6633c7 (patch) | |
tree | eddaeb3ab8f364c4b80eeecaab9fc139c39a70ef /src/objective-c/GRPCClient | |
parent | 87b19144370fe5a7923e6cf549c48a67631a4145 (diff) |
Add comment to self == [GRPCCall self]
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 2 |
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]; |