Thread#value when thread is killed


#1

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B

e$B%j%U%!%l%s%9%^%K%e%"%k$NJT=8$r$7$F$$$F5$$K$J$C$?$N$G$9$,!"e(B
e$B%9%l%C%I$,e(B kill e$B$5$l$?;~$N!"e(BThread#value
e$B$NJV$jCM$OITDje(B
e$B$H$$$&$3$H$GNI$$$N$G$7$g$&$+!#e(B
ruby-1.8 e$B$G$Oe(B false e$B$,JV$j$^$9!#e(Bruby-1.9 e$B$G$Oe(B nil
e$B$,JV$j$^$9!#e(B

$ cat t.rb
th = Thread.new{sleep 10; 1}
th.exit
p th.value

$ ruby-1.8 -v t.rb
ruby 1.8.6 (2007-06-10 patchlevel 5000) [i686-linux]
false

$ ruby-1.9 -v t.rb
ruby 1.9.0 (2007-06-15 patchlevel 0) [i686-linux]
nil


#2

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31025] Thread#value when thread is killed”
on Tue, 19 Jun 2007 23:15:39 +0900, sheepman
removed_email_address@domain.invalid writes:

|e$B%j%U%!%l%s%9%^%K%e%"%k$NJT=8$r$7$F$$$F5$$K$J$C$?$N$G$9$,!"e(B
|e$B%9%l%C%I$,e(B kill e$B$5$l$?;~$N!"e(BThread#value e$B$NJV$jCM$OITDje(B
|e$B$H$$$&$3$H$GNI$$$N$G$7$g$&$+!#e(B
|ruby-1.8 e$B$G$Oe(B false e$B$,JV$j$^$9!#e(Bruby-1.9 e$B$G$Oe(B nil e$B$,JV$j$^$9!#e(B

JRubye$B$N?M$?$A$O!V$=$b$=$be(Bkille$B$r$J$/$7$?$$!W$H8@$C$F$?$h$&$Je(B
e$B5$$,$7$^$9$,!"$=$l$O$=$l$H$7$F!#e(Bnile$B$,$$$$$+$J$"!#e(B

e$B$G$b!"e(B1.8e$B$N;EMM$rJQ$($k$N$OHyL/$K$a$s$I$/$5$$!#$d$C$QITDj$+!#e(B