Split server stop() and join()

For consistency with the other components, call stop() and join()
separately.

This allows to stop all components, then join them all.
This commit is contained in:
Romain Vimont
2023-02-22 18:41:22 +01:00
parent 6bf861ec2c
commit 0e44b3158b
3 changed files with 11 additions and 0 deletions

View File

@@ -909,7 +909,10 @@ sc_server_stop(struct sc_server *server) {
sc_cond_signal(&server->cond_stopped);
sc_intr_interrupt(&server->intr);
sc_mutex_unlock(&server->mutex);
}
void
sc_server_join(struct sc_server *server) {
sc_thread_join(&server->thread, NULL);
}