From c43b1d4c479908fc9589f825e7e4626fc5e12473 Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Mon, 15 Apr 2024 13:02:00 +0100 Subject: [PATCH] DOCS: Hint about deadlock if concurrency_limit is applied without buffer --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7742f4f..5ca4c27 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,10 @@ application task. At this level the developer must pay closer attention to utilising Tower layers to control the concurrency of the individual services mentioned above. In particular the `Consensus` service should be wrapped with -`ServiceBuilder::concurrency_limit` to avoid a potential reordering of -consensus message effects caused by concurrent execution. +`ServiceBuilder::concurrency_limit` of 1 to avoid a potential reordering of +consensus message effects caused by concurrent execution, as well as +`ServiceBuilder::buffer` to avoid any deadlocks in message handling in `Connection` +due to the limited concurrency. 3. At the highest level of complexity, application developers can implement multiple distinct `Service`s and manually control synchronization of shared