Added additional locking

This commit is contained in:
Justin Ethier 2015-11-16 23:06:26 -05:00
parent 3d41425e88
commit 426bfe0365

2
gc.c
View file

@ -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"