Skip to content
Snippets Groups Projects
Commit 528af97a authored by makdharma's avatar makdharma Committed by GitHub
Browse files

Merge pull request #7866 from jcanizales/p0-grpc-init-on-load

Let tracing be enabled before starting an RPC
parents 179e6246 7603d649
No related branches found
No related tags found
No related merge requests found
......@@ -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];
}
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment