Initiates graceful shutdown and waits for all tasks to drain.
(&self)
| 81 | |
| 82 | /// Initiates graceful shutdown and waits for all tasks to drain. |
| 83 | pub(crate) async fn shutdown_and_wait(&self) { |
| 84 | self.shutdown.cancel(); |
| 85 | self.tracker.close(); |
| 86 | self.tracker.wait().await; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /// Shared healthcheck arguments for all server subcommands. |