summaryrefslogtreecommitdiff
path: root/ext/tk/sample/irbtkw.rbw
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-06 02:56:32 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-06 02:56:32 +0000
commit4cd2a9864c9d215500dacef309c4eacb0db9ce3a (patch)
treeee1485c35fe849da2c7c33755341e16a2ca75646 /ext/tk/sample/irbtkw.rbw
parent92cea77f951c15ac7af1699fa4194cc80475974a (diff)
* ext/tk/sample/irbtkw.rbw: fails to exit process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/irbtkw.rbw')
-rw-r--r--ext/tk/sample/irbtkw.rbw7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/tk/sample/irbtkw.rbw b/ext/tk/sample/irbtkw.rbw
index 92fa569..f6a35be 100644
--- a/ext/tk/sample/irbtkw.rbw
+++ b/ext/tk/sample/irbtkw.rbw
@@ -26,7 +26,11 @@ console.yscrollbar(TkScrollbar.new(top, :width=>10).pack(:before=>console,
:side=>:right,
:expand=>false,
:fill=>:y))
-ev_loop = Thread.new{Tk.mainloop}
+irb_thread = nil
+ev_loop = Thread.new{
+ Tk.mainloop
+ irb_thread.kill if irb_thread
+}
# window position control
root = Tk.root
@@ -116,4 +120,5 @@ console.bind('Control-c'){
irb_thread.join
# exit
+ev_thread.kill
Tk.exit