diff options
author | 2016-02-22 03:21:08 +0100 | |
---|---|---|
committer | 2016-02-22 03:21:08 +0100 | |
commit | 88dc3c5d32f8d6c627983ddfb7f5dc66e3d614ea (patch) | |
tree | 3bd2269e57b76388a840c1d0f5f250ed900006a2 /src/ruby/ext | |
parent | cb90397216ea5d1eb82bc257e1263c9b606ed6f2 (diff) |
Adding an explanatory comment.
Diffstat (limited to 'src/ruby/ext')
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index 996357c238..0f9b18fa21 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -302,6 +302,16 @@ void Init_grpc_c() { return; } + /* ruby_vm_at_exit doesn't seem to be working. It would crash once every + * blue moon, and some users are getting it repeatedly. See the discussions + * - https://github.com/grpc/grpc/pull/5337 + * - https://bugs.ruby-lang.org/issues/12095 + * + * In order to still be able to handle the (unlikely) situation where the + * extension is loaded by a first Ruby VM that is subsequently destroyed, + * then loaded again by another VM within the same process, we need to + * schedule our initialization and destruction only once. + */ gpr_once_init(&g_once_init, grpc_ruby_once_init); grpc_rb_mGRPC = rb_define_module("GRPC"); |