Revision
1936
Author
lsansonetti@apple.com
Date
2009-06-26 12:10:59 -0700 (Fri, 26 Jun 2009)

Log Message

don't try to join a dead thread

Modified Paths

Diff

Modified: MacRuby/branches/experimental/thread.c (1935 => 1936)


--- MacRuby/branches/experimental/thread.c	2009-06-26 18:52:49 UTC (rev 1935)
+++ MacRuby/branches/experimental/thread.c	2009-06-26 19:10:59 UTC (rev 1936)
@@ -144,7 +144,9 @@
     }
 
     rb_vm_thread_t *t = GetThreadPtr(self);
-    assert(pthread_join(t->thread, NULL) == 0);
+    if (t->status != THREAD_DEAD) {
+	assert(pthread_join(t->thread, NULL) == 0);
+    }
 
     return self;
 }