fastthread$B$K$D$$$F(B

e$BA0ED$G$9!#e(B

e$B$A$g$C$HCY$-$K<:$7$?46$b$"$j$^$9$,!“e(Bfastthreade$B$N%3!<%I%l%S%e!<$re(B
e$B$7$^$7$?$N$G!”$$$/$D$+5$IU$$$?E@$r!#e(B

(1) rb_thread_wakeup()e$B$Ne(Brb_rescue2()

rb_thread_wakeup()e$B$re(Brb_rescue2()e$B$G<B9T$7$Fe(BThreadErrore$B$rL5;k$9$ke(B
e$B$h$&$K$7$F$$$^$9$,!“e(BTHREAD_KILLEDe$B$J%9%l%C%I$O%9%-%C%W$7$F<!$Ne(B
e$B%9%l%C%I$re(Bwakeupe$B$7$J$$$H!”$@$l$be(BMutexe$B$r3MF@$G$-$J$/$J$C$F$^$:$$e(B
e$B$h$&$J5$$,$7$^$9!#e(B

(2) Marshale$B$NBP1~e(B

Marshale$B$Ge(Blocke$B$G%V%m%C%/$7$F$$$k;~$K$be(Bdump/loade$B$G$-$k$h$&$K$J$C$Fe(B
e$B$$$^$9$,!":#$Ne(BMutexe$B$G$Oe(Blocke$BCf$Oe(Bdump/loade$B$G$-$J$$$N$GHs8_49$G$9$M!#e(B
Javae$B$Ne(BObjecte$B$be(Bdump/loade$B$G$-$ke(B(Javae$B$@$H%b%K%?5!9=$Oe(BObjecte$B$KHw$o$C$Fe(B
e$B$$$^$9e(B)e$B$N$GLdBj$J$$$H$O;W$&$N$G$9$,!"$3$NE@$K$D$$$F$O==J,8!F$$5$l$Fe(B
e$B$$$^$9$G$7$g$&$+!#e(B

(3) malloc/free

malloc/freee$B$r;H$C$F$^$9$,!"e(Bxmalloc/xfreee$B$K$7$?J}$,$h$$$N$G$Oe(B
e$B$J$$$G$7$g$&$+!#e(B

(4) rb_thread_critical

e$B$$$/$D$+e(Brb_thread_criticale$B$NA`:n$r$7$F$$$^$9$,!“e(BCe$B%l%Y%k$G$Oe(B
e$B$”$k<o$Ne(BRuby APIe$B$r8F$P$J$$$+$.$j$O%9%1%8%e!<%j%s%0%$%Y%s%H$Oe(B
e$BH/@8$7$J$$$N$GITMW$G$O$J$$$G$7$g$&$+!#e(B

(5) Queue

Queuee$B$Oe(BRubye$B%l%Y%k$Ge(BMutex/ConditionVariablee$B$r;H$C$F<BAu$7$?J}$,e(B
e$B$$$$$h$&$K;W$$$^$9!#e(B

e$B$H$$$&$+!“e(BQueuee$B$H$$$&L>A0$b$A$g$C$H$”$l$J$N$G!"e(B1.9e$B$G$Oe(B

Thread::Queuee$B$H$+$K$7$?J}$,$$$$5$$b!#e(B

e$B$=$&$9$k$H!"e(BListe$B$Ne(Bsizee$B$J$I$Oe(BMutex/ConditionVariablee$B$N<B8=$K$Oe(B
e$BITMW$J$N$G:o$k$3$H$b$G$-$^$9$M!#e(B

(6) e$B<B@Se(B

Mongrele$B$G;H$C$F$$$k$N$G<B@S$,$"$k$H$$$&$3$H$G$9$,!“e(BConditionVariable
e$B$O;H$o$l$F$$$J$$$h$&$K;W$$$^$9!#e(B
e$B$I$A$i$+$H$$$&$He(BConditionVariablee$B$NJ}$,LdBj$,5/$-$d$9$$$+$b$7$l$^$;$s!#e(B
e$B$”$H!"%9%l%C%I$,$i$_$@$H$"$k%"%W%j%1!<%7%g%s$GLdBj$J$$$+$i$H$$$C$F!“e(B
e$BB>$N%”%W%j%1!<%7%g%s$GLdBj$J$$$H$O$$$($J$$$N$G!“J#?t$N%”%W%j%1!<%7%g%se(B
e$B$G8!>Z$7$?J}$,K>$^$7$$$G$9$M!#e(B

(7) e$B%a%s%F%Je(B

fastthreade$B$N%a%s%F%J$OC/$K$J$k$N$G$7$g$&$+e(B?

e$B:G8e$NJ}$O%3!<%I$H4X78$J$/$J$C$F$^$9$Me(B;p
e$BB>$K$b2?$+$"$C$?$h$&$J5$$,$7$^$9$,!“K:$l$^$7$?!#e(B
e$BA4BNE*$KCWL?E*$JLdBj$,$”$k$o$1$G$O$J$$e(B(lib/thread.rbe$B$HF1$8DxEYe(B
e$B$K$O>e<j$/F0$-$=$&e(B)e$B$H;W$&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@$He(B:INTe$B$H=PNO$7$F=*N;$7$^$9$,!"e(Bruby_1_8_5e$B$G$Oe(Bflocke$B$G%m%C%/e(B
e$B$r3MF@$7$FLa$C$FMh$k$^$G2?$b5/$3$j$^$;$s!#e(B

ruby_1_8e$B$G=$@5$5$l$?%j%S%8%g%s$Oe(B11203e$B$G$9$,!“Fs$D$”$k=$@5$N$&$A!"e(B

    * signal.c (ruby_signal): don't set SA_RESTART.  a backport from
      the HEAD.  [ruby-talk:220937]  [ruby-talk:147220]

e$B$NJ}$,>e5-$NLdBj$N=$@5$G$9!#e(B

e$BA0ED$G$9!#e(B

Shugo M. wrote:

(1) rb_thread_wakeup()e$B$Ne(Brb_rescue2()

rb_thread_wakeup()e$B$re(Brb_rescue2()e$B$G<B9T$7$Fe(BThreadErrore$B$rL5;k$9$ke(B
e$B$h$&$K$7$F$$$^$9$,!“e(BTHREAD_KILLEDe$B$J%9%l%C%I$O%9%-%C%W$7$F<!$Ne(B
e$B%9%l%C%I$re(Bwakeupe$B$7$J$$$H!”$@$l$be(BMutexe$B$r3MF@$G$-$J$/$J$C$F$^$:$$e(B
e$B$h$&$J5$$,$7$^$9!#e(B

e$B$3$l$O4*0c$$$G$7$?!#e(B
rescue2()e$B$NLa$jCM$r8+$Fe(Bwhilee$B%k!<%W$r2s$7$F$$$k$N$G>e5-$N$h$&$Je(B
e$B=hM}$K$J$C$F$$$=$&$G$9$M!#e(B

e$BKNIt$G$9e(B

Shugo M. wrote:

ruby_1_8e$B$G$OD>$C$F$$$k$s$G$9$,!“e(B1.8.5e$B$G$OFCDj$N%W%i%C%H%U%)!<%e(B (e$B<+J,$,3NG'$7$?$N$Oe(BLinxu)e$B$G!"e(Bflocke$B$J$I$N%7%9%F%%3!<%k$G%V%m%C%/e(B
e$B$7$F$$$k;~$K3d$j9~$_$,8z$+$J$$LdBj$,$”$k$h$&$G$9!#e(B

e$B$U$!#$5$9$,$K$3$N5sF0$K0MB8$7$F$k%W%m%0%i%$O$J$$$H?.$8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$OMn$ACe$$$F$$$J$$$N$G!"e(B ruby_1_8
e$B$G8x3+%F%9%H$7$Fe(B
e$B$$$k$H$$$&>u67$G$9!#e(B(e$B2<$NJ}$KB3$/e(B)

(1) rb_thread_wakeup()e$B$Ne(Brb_rescue2()

rb_thread_wakeup()e$B$re(Brb_rescue2()e$B$G<B9T$7$Fe(BThreadErrore$B$rL5;k$9$ke(B
e$B$h$&$K$7$F$$$^$9$,!“e(BTHREAD_KILLEDe$B$J%9%l%C%I$O%9%-%C%W$7$F<!$Ne(B
e$B%9%l%C%I$re(Bwakeupe$B$7$J$$$H!”$@$l$be(BMutexe$B$r3MF@$G$-$J$/$J$C$F$^$:$$e(B
e$B$h$&$J5$$,$7$^$9!#e(B

e$B!!JL%a!<%k$NDL$j!"JV$jCM$r8+$F%k!<%W$r7QB3$7$F$$$k$N$GBg>fIW$=$&e(B
e$B$G$9$M!#e(B

(2) Marshale$B$NBP1~e(B

Marshale$B$Ge(Blocke$B$G%V%m%C%/$7$F$$$k;~$K$be(Bdump/loade$B$G$-$k$h$&$K$J$C$Fe(B
e$B$$$^$9$,!“:#$Ne(BMutexe$B$G$Oe(Blocke$BCf$Oe(Bdump/loade$B$G$-$J$$$N$GHs8_49$G$9$M!#e(B
Javae$B$Ne(BObjecte$B$be(Bdump/loade$B$G$-$ke(B(Javae$B$@$H%b%K%?5!9=$Oe(BObjecte$B$KHw$o$C$Fe(B
e$B$$$^$9e(B)e$B$N$GLdBj$J$$$H$O;W$&$N$G$9$,!”$3$NE@$K$D$$$F$O==J,8!F$$5$l$Fe(B
e$B$$$^$9$G$7$g$&$+!#e(B

e$B!!5$$E$-$^$;$s$G$7$?!#8!F$$7$^$9!#e(B

(3) malloc/free

malloc/freee$B$r;H$C$F$^$9$,!"e(Bxmalloc/xfreee$B$K$7$?J}$,$h$$$N$G$Oe(B
e$B$J$$$G$7$g$&$+!#e(B

e$B!!=$@5$7$^$9!#e(B

(4) rb_thread_critical

e$B$$$/$D$+e(Brb_thread_criticale$B$NA`:n$r$7$F$$$^$9$,!“e(BCe$B%l%Y%k$G$Oe(B
e$B$”$k<o$Ne(BRuby APIe$B$r8F$P$J$$$+$.$j$O%9%1%8%e!<%j%s%0%$%Y%s%H$Oe(B
e$BH/@8$7$J$$$N$GITMW$G$O$J$$$G$7$g$&$+!#e(B

e$B!!3N$+$K!#@Dj$7$F$$$kCM$bE}0l46$,$J$$$N$G8+D>$7$F$$^$9!#e(B

(5) Queue

Queuee$B$Oe(BRubye$B%l%Y%k$Ge(BMutex/ConditionVariablee$B$r;H$C$F<BAu$7$?J}$,e(B
e$B$$$$$h$&$K;W$$$^$9!#e(B

e$B$H$$$&$+!“e(BQueuee$B$H$$$&L>A0$b$A$g$C$H$”$l$J$N$G!"e(B1.9e$B$G$Oe(B

Thread::Queuee$B$H$+$K$7$?J}$,$$$$5$$b!#e(B

e$B$=$&$9$k$H!"e(BListe$B$Ne(Bsizee$B$J$I$Oe(BMutex/ConditionVariablee$B$N<B8=$K$Oe(B
e$BITMW$J$N$G:o$k$3$H$b$G$-$^$9$M!#e(B

e$B!!:n<T$H$bAjCL$7$F$_$^$9!#e(B

(6) e$B<B@Se(B

Mongrele$B$G;H$C$F$$$k$N$G<B@S$,$“$k$H$$$&$3$H$G$9$,!“e(BConditionVariable
e$B$O;H$o$l$F$$$J$$$h$&$K;W$$$^$9!#e(B
e$B$I$A$i$+$H$$$&$He(BConditionVariablee$B$NJ}$,LdBj$,5/$-$d$9$$$+$b$7$l$^$;$s!#e(B
e$B$”$H!”%9%l%C%I$,$i$_$@$H$“$k%”%W%j%1!<%7%g%s$GLdBj$J$$$+$i$H$$$C$F!“e(B
e$BB>$N%”%W%j%1!<%7%g%s$GLdBj$J$$$H$O$$$($J$$$N$G!“J#?t$N%”%W%j%1!<%7%g%se(B
e$B$G8!>Z$7$?J}$,K>$^$7$$$G$9$M!#e(B

e$B!!$3$l$OBg$-$J2]Bj$G$9!#%^%k%A%9%l%C%I$N<j:“$J%F%9%H%9%$!<%H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j$,8+$D$+$C$?>l9g$K$O!”:G=*%j%j!<%9$Oe(B
–disable-fastthread e$B$r%G%U%)%k%H$K$7$F=P2Y$9$k$3$H$K$7$F$$$^$9!#e(B

1.8.5e$B$b%a%s%F%J%s%9$5$l$k$3$H$G$9$7!"$3$N$^$^$($$$d$C$HF~$l$Fe(B
e$B$7$^$C$F$b$$$$$G$9$+$M!#e(B

e$B!!$O$$!“F1MM$Ke(B 1.8.6
e$B$b%a%s%F%J%s%9$5$l$^$9!#%Q%C%A%j%j!<%9e(B(-p#)
e$B$H$$$&?7$7$$IJ<A8~>e%5%$%/%k$,$G$-$?$3$H$G!”>/$73Z4QE*$JJ}?K$Ke(B
e$B$J$C$F$$$^$9!#e(B

e$B!!e(B1.8.6
e$B:G=*%j%j!<%9$r$I$&$9$k$+$O!"0J>e$N%l%S%e!<7k2L$X$NBP1~$Ne(B
e$BCf$G7h$a$?$$$H;W$$$^$9!#e(B


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”

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

In message “Re: [ruby-dev:30430] Re: fastthreade$B$K$D$$$Fe(B”
on Mon, 26 Feb 2007 15:48:05 +0900, Shugo M.
[email protected] writes:

|e$B$"$H!"e(BMutex#unlocke$B$G%m%C%/Cf$G$O$J$+$C$?$H$-$Ke(Bselfe$B$NBe$o$j$Ke(Bnile$B$rJV$9e(B
|e$B$H$3$m$^$G%%j%8%J%k$HF1$8$K$7$F$"$k$H$3$m$K$A$g$C$H46F0$7$?$N$G$9$,!"e(B
|e$B$3$l$C$F$=$b$=$b0U?^E
$@$C$?$s$G$7$g$&$+e(B? > e$B$^$D$b$H$5$se(B

e$B3N$+$=$&$@$C$?$h$&$K;W$$$^$9!#e(B

e$BA0ED$G$9!#e(B

e$B0lHV2<$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