summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
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.