From c6551e8ce0ffa46368e0ba650967c22c6fb77b20 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Wed, 4 Sep 2024 17:11:25 -0400 Subject: [PATCH] service/shutdown --- books/architecture/src/storage/common/service/shutdown.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/books/architecture/src/storage/common/service/shutdown.md b/books/architecture/src/storage/common/service/shutdown.md index cfe83db..4f9890e 100644 --- a/books/architecture/src/storage/common/service/shutdown.md +++ b/books/architecture/src/storage/common/service/shutdown.md @@ -1 +1,4 @@ -# 🟢 Shutdown +# Shutdown +Once the read/write handles to the `tower::Service` are `Drop`ed, the backing thread(pool) will gracefully exit, automatically. + +Note the writer thread and reader threadpool aren't connected whatsoever; dropping the write handle will make the writer thread exit, however, the reader handle is free to be held onto and can be continued to be read from - and vice-versa for the write handle.