* src/threads/thread.cpp: Use a finalizer to remove dead threads.
[cacao.git] / src / threads / posix / thread-posix.cpp
index 45c71405f933c7f2bf054b36a8c6d03d54d42ef7..058a3bda94522821d1b4bd600e21c667137f17cb 100644 (file)
@@ -459,6 +459,7 @@ void threads_impl_thread_clear(threadobject *t)
        t->index = 0;
        t->flags = 0;
        t->state = 0;
+       t->is_in_active_list = false;
 
        t->tid = 0;
 
@@ -532,6 +533,11 @@ void threads_impl_thread_reuse(threadobject *t)
 #endif
 }
 
+void threads_impl_clear_heap_pointers(threadobject *t)
+{
+       t->object = 0;
+       t->flc_object = 0;
+}
 
 /* threads_impl_preinit ********************************************************