aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-08 07:16:34 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-08 07:16:34 -0700
commitebfcd97940e6688a37c36cdeac87da3196ce1a9b (patch)
treefa284a70c6857e2cbb9aa127d109ba9f7e434798 /src/objective-c/GRPCClient
parent9717e5fe93a5b6d0042b43369655bb696a86bb9f (diff)
parent47b2961638328d29577361c3cb4dec5ab5bab537 (diff)
Merge remote-tracking branch 'upstream/master' into max_send_size_filter
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 05a1d10f6d..eecda4c03a 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -103,6 +103,11 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey";
@synthesize state = _state;
+// TODO(jcanizales): If grpc_init is idempotent, this should be changed from load to initialize.
++ (void)load {
+ grpc_init();
+}
+
- (instancetype)init {
return [self initWithHost:nil path:nil requestsWriter:nil];
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 97f6b89340..1339429660 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -245,11 +245,6 @@
}
if (self = [super init]) {
- static dispatch_once_t initialization;
- dispatch_once(&initialization, ^{
- grpc_init();
- });
-
// Each completion queue consumes one thread. There's a trade to be made between creating and
// consuming too many threads and having contention of multiple calls in a single completion
// queue. Currently we use a singleton queue.