Skip to content

Commit e7a3e03

Browse files
committed
f Add comment on internal_runtime
1 parent beef366 commit e7a3e03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/io/vss_store.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ pub struct VssStore {
5454
// operations aren't sensitive to the order of execution.
5555
next_version: AtomicU64,
5656
runtime: Arc<Runtime>,
57+
// A VSS-internal runtime we use to avoid any deadlocks we could hit when waiting on a spawned
58+
// blocking task to finish while the blocked thread had acquired the reactor. In particular,
59+
// this works around a previously-hit case where a concurrent call to
60+
// `PeerManager::process_pending_events` -> `ChannelManager::get_and_clear_pending_msg_events`
61+
// would deadlock when trying to acquire sync `Mutex` locks that are held by the thread
62+
// currently being blocked waiting on the VSS operation to finish.
5763
internal_runtime: Option<tokio::runtime::Runtime>,
5864
}
5965

0 commit comments

Comments
 (0)