| 630 | } |
| 631 | |
| 632 | static bool frontend_stop_begin(frontend_state_t *state) { |
| 633 | cbm_mutex_lock(&state->mutex); |
| 634 | state->stopping = true; |
| 635 | cbm_mutex_unlock(&state->mutex); |
| 636 | /* Retain the client allocation until the worker is joined. This covers the |
| 637 | * boundary where the worker has claimed an item but has not yet entered the |
| 638 | * runtime exchange: a late call observes closing instead of freed memory. */ |
| 639 | return cbm_daemon_runtime_client_close_begin(state->client); |
| 640 | } |
| 641 | |
| 642 | static bool frontend_cancel_for_maintenance(void *opaque) { |
| 643 | frontend_state_t *state = opaque; |
no test coverage detected