Remove redundant cycles
@@ -1605,9 +1605,9 @@ static void facil_worker_cleanup(void) {
defer(deferred_on_shutdown, (void *)uuid, NULL);
}
}
- defer(facil_cycle_unwind, NULL, NULL);
facil_data->thread_pool = defer_pool_start(facil_data->threads);
if (facil_data->thread_pool) {
+ defer(facil_cycle_unwind, NULL, NULL);
defer_pool_wait(facil_data->thread_pool);
facil_data->thread_pool = NULL;
}
@@ -1619,13 +1619,7 @@ static void facil_worker_cleanup(void) {
sock_force_close(uuid);
}
}
- evio_review(0);
- defer_perform();
- sock_flush_all();
- evio_review(0);
- sock_flush_all();
defer_perform();
- sock_flush_all();
facil_data->on_finish();
defer_perform();
evio_close();
