Skip to content

Commit

Permalink
DOCS: Hint about deadlock if concurrency_limit is applied without buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Apr 15, 2024
1 parent e2474c3 commit c43b1d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c43b1d4

Please sign in to comment.