From 426bfe03650e308c9581232f32fef6649e688f7d Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 16 Nov 2015 23:06:26 -0500 Subject: [PATCH] Added additional locking --- gc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gc.c b/gc.c index f3f67433..f7bc528f 100644 --- a/gc.c +++ b/gc.c @@ -583,8 +583,10 @@ void gc_mut_cooperate(gc_thread_data *thd) if (thd->gc_status != status) { if (thd->gc_status == STATUS_ASYNC) { // Async is done, so clean up old mark data from the last collection + pthread_mutex_lock(&(thd->lock)); thd->last_write = 0; thd->last_read = 0; + pthread_mutex_unlock(&(thd->lock)); } else if (thd->gc_status == STATUS_SYNC2) { // Mark thread "roots"