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

Status changed from Closed to Assigned
Assignee changed from kosaki (Motohiro KOSAKI) to matz (Yukihiro Matsumoto)
Priority changed from High to Normal

??吟???????????????????? #1????CPU篏睡??????莊潟????????????????????????違?с??腟???????????????????Ctrl-C?????鴻??????????????罕????????荀?茹c????冴????????????с???????????c???r37865???CPU篏睡???????????眼????障????????
?????????????障?冗???????????障?c????????????障?c????????????????????с????障?ゃ?????????????????????????????

?????莎欠エ????違?????ensure??х?♂??sleep?????????<????c??????????????????????鴻?????????с????????IO.read ????с?????罕?????腟?篋????????鐚?Ctrl-C??鴻????????????莎激???????障??????????????Ctrl-C???腟九??<?ゃ?潟?鴻????????????吟??с?泣????鴻?????????莎激??????????????????????????с??罕????????????????????с???????? close??????????????????

???????????????c????????翫??????????????????篏????????????????c???????????????????????????

[Feature #1952] ??? #12???mame???????????御????≪?????????ゃ????????????????????????

> ?????????????眼??????????????違??
>
>  - ??泣????鴻??????????篋?緇???∞?倶????? SIGINT ??????????????c????????
>    eTerminateSignal ???????????????
>    - ?????ゃ????? Ctrl+C ?????若???????????違????ゃ??腟?篋???с??????????????
>
>  - eTerminateSignal ???????????с??????箴?紊????????
>    - ??泣????鴻????????? ensure ???絎?茵???????????
>
>  - eTerminateSignal ????????????亥?????????腟?????c???????????翫?????
>    ????????с??????箴?紊?????????????
>    - ??泣????鴻????????? ensure ???絎?茵?????????????演?冴??膩??????????????
>      ??莖?????茹f浦???????????????????泣??
>
> ???????????????????ゃ????障?????????????????????????????? or ??√????с??????

????????????潟?<?潟???????ゃ????????障?????[Feature #1952]???????筝?綺茯??帥???????????????潟?<?潟?????????????????????????????????????

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

Author: Glass_saga (Masaki Matsushita)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
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/