Avoid LRU thread hanging during shutdown

parent f150bde0
......@@ -5155,11 +5155,15 @@ void
fellow_cache_fini(struct fellow_cache **fcp)
{
struct fellow_cache *fc;
int i;
TAKE_OBJ_NOTNULL(fc, fcp, FELLOW_CACHE_MAGIC);
fc->running = 0;
buddy_wait_kick(fc->membuddy);
for (i = 0; i < 5; i++) {
buddy_wait_kick(fc->membuddy);
(void) usleep(10*1000);
}
fellow_cache_lrus_fini(fc->lrus);
assert(VRBT_EMPTY(&fc->fdb_head));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment