[$B<ALd#2E@(B] C $B$+$i$NDj?t;2>H(B & thread switching $B%3%9%H$NDc8:(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

e$B$9$_$^$;$s$,!$#2E@<ALd$5$;$F$/$@$5$$!%e(B

e$B$^$:#1E@L$G$9!%e(B

—[e$B<ALd#1e(B]-----------------------------------------------------
C e$B8@8l$G=q$+$l$?4X?t$Ke(B “::AAA::BBB::CCC” e$B$H$$$&7A$Ge(B
e$BDj?te(B/e$B%/%i%9e(B/e$B%b%8%e!<%k$N%Q%9J8;zNs$,EO$5$l$?;~!$e(B
e$BBP>]$H$J$k%*%V%8%’%/%H$rF@$k$?$a$NDc%3%9%H$J<BAu$Oe(B
e$B$I$N$h$&$K=q$/$Y$-$G$7$g$&$+!%e(B

e$B$?$@$7!$BP>]$H$J$k%%V%8%’%/%H$O$3$N8!:w$N:]$Ke(B
autoload e$B$GFI$9~$^$l$k2DG=@-$,$"$k$?$a!$e(B
autoload e$B$N5!9=$O$-$A$s$HF/$/I,MW$,$"$j$^$9!%e(B
e$B$^$?!$Dj?t$,B8:
$7$J$$$J$I$NNc30$bJaB
$;$M$P$J$j$^$;$s!%e(B

e$BC1=c$JJ}K!$J$i!$e(Brb_eval_string_protect(str, &state) e$B$+$J$H$Oe(B
e$B;W$&$N$G$9$,!%!%!%e(B

e$B<!$K#2E@L$G$9!%e(B

—[e$B<ALd#2e(B]-----------------------------------------------------
thread A e$B$+$ie(B thread B e$B$K=hM}$r0MMj$7!$$=$N7k2L$re(B thread A
e$B$Ge(B
e$B<u$1<h$j$?$$$H$$$&>l9g$K$D$$$F$G$9!%e(B

thread B e$B$OJ#?t$Ne(B thread e$B$+$i$N0MMj$r<u$1IU$1$k$?$a!$e(B
thread A e$B$+$i$N0MMj$r=hM}$7$?8e$OB.$d$+$KJL$N0MMj$re(B
e$B=hM}$9$kI,MW$,$"$j$^$9!%e(B
e$B$^$?!$e(Bthread B e$B$K$Oe(B local e$B$K=hM}$9$Y$-;E;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B
thread e$B$G$/$k$s$G<B9T$9$k$h$&$K$7$?>l9g!$e(B
eventloop e$B$Ne(B thread e$B$H$N4V$K7c$7$$%a%C%;!<%8$N1~=7$,9T$o$l$Fe(B
e$BL$K8+$($F=hM}B.EY$,Dc2<$7$F$7$^$$$^$9!%e(B

GUI e$B$N9=C[$N:]$K$O!$0MMj"*LaCM<u$1<h$j"*LaCM$K4p$E$$$F$N0MMje(B
e$B$H$$$&$N$,IQHK$K9T$o$l$k$?$a$K82Cx$KCY$/$J$j$^$9!%e(B
GUI e$B$N9=C[$,40N;$7$F$7$^$($P!$DL>o$O%9%/%j%W%HB&$+$i$Ne(B
e$B=hM}0MMj$O7c8:$9$k$N$G!$B.EYDc2<$O$[$\LdBj$K$J$i$J$$$h$&$G$9!%e(B

e$B8=:$Ne(B eventloop e$B$G$O!$O"B3=hM}?te(B
(e$B=hM}$,$J$$;~$K$OB?$/A}2C$5$;$ke(B) e$B$He(B
e$B%?%$%^!<$H$NAH9g$o$;$G!$@Z$jBX$($N%?%$%
%s%0$re(B
e$B%9%/%j%W%H$+$i$"$kDxEY%3%s%H%m!<%k$G$-$k$h$&$K$O$7$F$$$^$9$,!$e(B
e$B$I$N$h$&$JCM$K$9$Y$-$+$N:,5r$,$"$k$o$1$G$b$J$/!$e(B
e$B>lEv$?$jE*$JBP1~$K2a$.$J$$$3$H$,5$$K$J$C$F$$$^$9!%e(B

e$B$G$9$N$G!$!V$=$&$7$?>l9g$O$3$&$9$Y$-!W$H$$$&$N$,$"$l$Pe(B
e$B$<$R65$($r@A$$$?$$$H;W$C$F$$$^$9!%e(B
e$B$h$m$7$/$*4j$$$7$^$9!%e(B

e$B$J$+$@$G$9!#e(B

At Wed, 26 Mar 2008 19:29:43 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:34144]:

—[e$B<ALd#1e(B]-----------------------------------------------------
C e$B8@8l$G=q$+$l$?4X?t$Ke(B “::AAA::BBB::CCC” e$B$H$$$&7A$Ge(B
e$BDj?te(B/e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$B$7$?$[$&$,$$$$$N$+$b$7$l$^$;$s!#e(B
thread Ae$B$H$NDL?.$,LdBj$K$J$j$^$9$,!#e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

e$B2sEz$r$"$j$,$H$&$4$6$$$^$9!%e(B

From: Nobuyoshi N. [email protected]
Subject: [ruby-dev:34234] Re: [e$B<ALd#2E@e(B] C e$B$+$i$NDj?t;2>He(B &
thread switching e$B%3%9%H$NDc8:e(B
Date: Thu, 3 Apr 2008 18:37:43 +0900
Message-ID: [email protected]

—[e$B<ALd#1e(B]-----------------------------------------------------
(snip)
e$BC1=c$JJ}K!$J$i!$e(Brb_eval_string_protect(str, &state) e$B$+$J$H$Oe(B
e$B;W$&$N$G$9$,!%!%!%e(B

e$B:#$N$H$3$m$=$&$9$k0J30$J$$$H;W$$$^$9!#e(B

e$B$=$&$G$9$+!%!%!%e(B
eval e$B$OCY$$$HJ9$$$F$$$?$N$G2DG=$J$iHr$1$?$[$&$,$$$$$N$+$J$He(B
e$B;W$C$F$$$^$7$?$,!$e(Brb_eval_string_protect
e$B$G07$&$3$H$K$7$^$9!%e(B

—[e$B<ALd#2e(B]-----------------------------------------------------
(snip)
thread Be$B$N=hM}$,JL$Ne(Bnative threade$B$G<B9T$G$-$k=hM}$G$"$l$P!"J,N%e(B
e$B$7$?$[$&$,$$$$$N$+$b$7$l$^$;$s!#e(B
thread Ae$B$H$NDL?.$,LdBj$K$J$j$^$9$,!#e(B

native thread e$B$NJ,N%$K$O$+$J$j$N<j4Ve(B
(e$B$*$C$7$c$kDL$j!$$=$NDL?.$Ge(B)
e$B$,I,MW$H$J$j$=$&$G$9$N$G!$<!@$Be$Ne(B Ruby/Tk
e$B$G$H9M$($F$$$^$9!%e(B

native thread e$B$re(B Ruby e$B$N@)8f$+$i@Z$jN%$9$3$H$N$[$+$K$Oe(B
e$B0lHLE*$K!V$3$l!*!W$H$$$&7A$GDLMQ$9$kJ}K!$O$J$/!$e(B
e$B8D!9$NLdBj$K9g$o$;$?BP=h$H$;$6$k$rF@$J$$$H$$$&$N$,e(B
e$B@5$7$$M}2r$H9M$($FNI$$$H$$$&$3$H$G$9$M!%e(B

e$B$"$j$,$H$&$4$6$$$^$7$?!%e(B

e$B$J$+$@$G$9!#e(B

At Fri, 4 Apr 2008 02:16:17 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:34246]:

e$BC1=c$JJ}K!$J$i!$e(Brb_eval_string_protect(str, &state) e$B$+$J$H$Oe(B
e$B;W$&$N$G$9$,!%!%!%e(B

e$B:#$N$H$3$m$=$&$9$k0J30$J$$$H;W$$$^$9!#e(B

e$B$=$&$G$9$+!%!%!%e(B
eval e$B$OCY$$$HJ9$$$F$$$?$N$G2DG=$J$iHr$1$?$[$&$,$$$$$N$+$J$He(B
e$B;W$C$F$$$^$7$?$,!$e(Brb_eval_string_protect e$B$G07$&$3$H$K$7$^$9!%e(B

e$B$"!“e(Bevale$B$8$c$J$/$F$b!“e(Bclass/modulee$B8BDj$J$i$Pe(Brb_protect()e$B7PM3$Ge(B
rb_path2class()e$B$r8F$Y$P$G$-$^$9!#Dj?t0lHL$K$D$$$F$O!”$”$C$?$[$&e(B
e$B$,$$$$$H$O;W$$$^$9$,!"8=>u$G$O$J$7$H$$$&$3$H$G!#e(B