Skip to content

Commit

Permalink
Proper init/shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Jun 4, 2015
1 parent af7abf9 commit 2f300e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/debug/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ void grpc_tracer_init(const char *env_var) {
parse(e);
gpr_free(e);
}
}

void grpc_tracer_shutdown(void) {
while (tracers) {
tracer *t = tracers;
tracers = t->next;
Expand Down
1 change: 1 addition & 0 deletions src/core/debug/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@

void grpc_register_tracer(const char *name, int *flag);
void grpc_tracer_init(const char *env_var_name);
void grpc_tracer_shutdown(void);

#endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_H */
1 change: 1 addition & 0 deletions src/core/surface/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ void grpc_shutdown(void) {
grpc_iomgr_shutdown();
census_shutdown();
grpc_timers_global_destroy();
grpc_tracer_shutdown();
}
gpr_mu_unlock(&g_init_mu);
}
Expand Down

0 comments on commit 2f300e2

Please sign in to comment.