summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-26 23:36:33 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-26 23:36:33 +0000
commit542190ce584fe2f0923227e591bfe2b8880dad42 (patch)
tree383fbce6cd63148aaa91c50675d2d18400fe8098 /ext/tk/lib/tk.rb
parent4aaea4c9b81dd70fe5255b44bdf6b3fef1354b53 (diff)
* ext/tk/lib/tk.rb: hang-up at exit before calling Tk.mainloop.
* ext/tk/lib/tk/extconf.rb: cannot make on MinGW [Ruby 1.9 - Bug #4141]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r--ext/tk/lib/tk.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 574ebf328b..5bac92e47c 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1294,9 +1294,9 @@ EOS
begin
begin
#TclTkLib.mainloop_abort_on_exception = false
- #Thread.current[:status].value = TclTkLib.mainloop(true)
#interp.mainloop_abort_on_exception = true
#Thread.current[:interp] = interp
+ #Thread.current[:status].value = TclTkLib.mainloop(true)
Thread.current[:status].value = interp.mainloop(true)
rescue SystemExit=>e
Thread.current[:status].value = e
@@ -1308,8 +1308,10 @@ EOS
INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast }
end
- #Thread.current[:status].value = TclTkLib.mainloop(false)
- Thread.current[:status].value = interp.mainloop(false)
+ unless interp.deleted?
+ #Thread.current[:status].value = TclTkLib.mainloop(false)
+ Thread.current[:status].value = interp.mainloop(false)
+ end
ensure
# interp must be deleted before the thread for interp is dead.