File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ def auto_terminate?
69
69
def enable_at_exit_handler! ( opts = { } )
70
70
if opts . fetch ( :stop_on_exit , true )
71
71
@auto_terminate = true
72
- if RUBY_PLATFORM == 'java '
73
- create_java_at_exit_handler !( self )
72
+ if RUBY_PLATFORM == 'ruby '
73
+ create_mri_at_exit_handler !( self . object_id )
74
74
else
75
- create_ruby_at_exit_handler !( self . object_id )
75
+ create_at_exit_handler !( self )
76
76
end
77
77
end
78
78
end
79
79
80
- def create_ruby_at_exit_handler !( id )
80
+ def create_mri_at_exit_handler !( id )
81
81
at_exit do
82
82
if Concurrent . auto_terminate_all_executors?
83
83
this = ObjectSpace . _id2ref ( id )
@@ -86,7 +86,7 @@ def create_ruby_at_exit_handler!(id)
86
86
end
87
87
end
88
88
89
- def create_java_at_exit_handler !( this )
89
+ def create_at_exit_handler !( this )
90
90
at_exit do
91
91
this . kill if Concurrent . auto_terminate_all_executors?
92
92
end
You can’t perform that action at this time.
0 commit comments