mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added additional locking
This commit is contained in:
parent
3d41425e88
commit
426bfe0365
1 changed files with 2 additions and 0 deletions
2
gc.c
2
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue