summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 623c98406..46d5d6622 100644
--- a/eval.c
+++ b/eval.c
@@ -9676,9 +9676,9 @@ rb_thread_cleanup()
FOREACH_THREAD_FROM(curr, th) {
if (th->status != THREAD_KILLED) {
rb_thread_ready(th);
- th->thgroup = 0;
- th->priority = 0;
if (th != main_thread) {
+ th->thgroup = 0;
+ th->priority = 0;
th->status = THREAD_TO_KILL;
RDATA(th->thread)->dfree = NULL;
}