diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-21 08:30:09 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-21 08:30:09 +0000 |
| commit | acae1b4416f45a4f88aaef2d23e785a6b14087d9 (patch) | |
| tree | acec075393700c201efd71cc2e3356e43c13212f /eval.c | |
| parent | a06c4fd090f2517465572bb2245efd3c06e3a438 (diff) | |
| download | ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.gz ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.xz ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.zip | |
* eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -8866,13 +8866,14 @@ rb_thread_wait_other_threads() static void rb_thread_cleanup() { - rb_thread_t th; + rb_thread_t curr, th; - while (curr_thread->status == THREAD_KILLED) { - curr_thread = curr_thread->prev; + curr = curr_thread; + while (curr->status == THREAD_KILLED) { + curr = curr_thread->prev; } - FOREACH_THREAD(th) { + FOREACH_THREAD_FROM(curr, th) { if (th->status != THREAD_KILLED) { rb_thread_ready(th); th->gid = 0; @@ -8883,7 +8884,7 @@ rb_thread_cleanup() } } } - END_FOREACH(th); + END_FOREACH_FROM(curr, th); } int rb_thread_critical; |
