Chain client locks reentrantly

Author: TweyCreated May 10, 2024Updated Sep 11, 2026
Labelsenhancement

The `ArcChainClient::listen` function has a coarse-scoped lock that is used reentrantly, easily creating deadlocks if one is not very careful about how `update_streams` is called; see https://github.com/linera-io/linera-protocol/pull/1173 for an example. To avoid trapping the unwary, it might be helpful to replace this lock, at least for the notification streams involved in `listen`/`update_streams`, with a communication channel.

Source: linera-io/linera-protocol