1
0
mirror of https://github.com/fumiama/simple-dict.git synced 2026-06-09 04:23:24 +08:00

fix isbusy

This commit is contained in:
源文雨
2022-10-15 10:39:39 +08:00
parent 42c013dc87
commit 6237946c31

View File

@@ -631,10 +631,12 @@ static void cleanup_thread(thread_timer_t* timer) {
}
close_dict(timer->index);
timer->thread = 0;
timer->isbusy = 0;
pthread_cond_destroy(&timer->c);
pthread_mutex_destroy(&timer->mc);
setdicts[timer->index].data[0] = 0;
pthread_rwlock_wrlock(&timer->mb);
timer->isbusy = 0;
pthread_rwlock_unlock(&timer->mb);
puts("Finish cleaning");
}