summaryrefslogtreecommitdiff
path: root/ext/tcltklib/tcltklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tcltklib/tcltklib.c')
-rw-r--r--ext/tcltklib/tcltklib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index d20c24eb222..50c654d8144 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -503,7 +503,9 @@ lib_eventloop_core(check_root, check_var)
rb_trap_exec();
} else {
DUMP1("thread scheduling");
- rb_thread_schedule();
+ if (is_ruby_native_thread()) {
+ rb_thread_schedule();
+ }
}
}
return 1;