Issue #5368 has been updated by kosaki (Motohiro KOSAKI).


茯?粋???????障????????[Feature #1952] ???<????c?篌???荅宴?х??篋????筝?т??紊?蕋????????????障?c???????????????荅宴????????с??????茫???鴻????障?????????

 - ensure膀???筝???sleep膈??????♂??緇???<??荐?菴違?????????????????潟?違????????障?????????????????違?с??????? (Glass_saga)
 - ??????翫??罩≪?障?c??????????泣????鴻??????????с??Ctrl-c?????潟????<???????<?ゃ?潟?鴻?????????蕋???c??∴???????????障??
 - ??????????????帥?ゃ????≪???膈??????ゃ????????篋????????????????????????鴻??????????紕??????????障?? (ko1)
 - ensure膀?絎?茵?筝??terminate????????????ensure????????????障?????ц??茯?篁?罕????????ゃ????ゃ?障???????c???? (蕭?絨障?????鐚?
 - sleep??у???????????????????筝?綺??紊????筝??????c????????????????????鴻????с??? 鐚???? ?????????????????????????? Ctrl-C??????????????<?ゃ?潟?鴻?????????thread terminate?????????????????????????????鐚?
 - Ctrl-c 篋???f????с??腟?篋??????????鴻?????????????????c?????????????????鐚?鐚??????????鐚?
 - ????main thread???sub thread????篋????緇???ゃ??吾???????????吾?若??若???????CPU100%????c?????障???????鴻?????????腟?篋?????????障?с?<??????????????鴻????с????????
   鐚?????????援??鐚?

???????????с?????????

----------------------------------------
Bug #5368: ensure膀????sleep???????????????Thread????????????ゃ?潟?帥?????帥??腟?篋????????
https://bugs.ruby-lang.org/issues/5368#change-33934

Author: Glass_saga (Masaki Matsushita)
Status: Assigned
Priority: High
Assignee: kosaki (Motohiro KOSAKI)
Category: core
Target version: 2.0.0
ruby -v: -


=begin
罨<??潟?若?????絎?茵??????????CPU篏睡??????莊潟????????c????倶?????????ゃ?潟?帥?????帥??腟?篋??????障????????

 Thread.new do
   begin
     sleep
   ensure
     sleep
   end
 end

????rb_thread_terminate_all??с?????????1????????????????????????鴻????????絲??????terminate_i???絎?茵??????????障????????ensure膀????sleep???????????????Thread???????????????????Thread?????????障?障???c?????障??while(!rb_thread_alone())?????♂?????若??????c?????障????障?????

while(!rb_thread_alone())?????????若????с???潟????鴻???????????<?ゃ?潟?鴻????????с????c????翫?????????????????????鴻????????絲??????terminate_i???絎?茵????????????????patch?????吾????????????????????????違???????????????障????????
patch???羞私???????障?????patch?????????test-all????????鴻????障?????
=end


-- 
http://bugs.ruby-lang.org/