Skip to content

Commit

Permalink
refactor(SharedTopologyController): Add blocking lock helper to Share…
Browse files Browse the repository at this point in the history
…dTopologyController (#21243)

add blocking lock helper to SharedTopologyController
  • Loading branch information
ArunPiduguDD committed Sep 9, 2024
1 parent a91d606 commit 9ccef3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/topology/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ impl SharedTopologyController {
Self(Arc::new(Mutex::new(inner)))
}

pub fn blocking_lock(&self) -> MutexGuard<TopologyController> {
self.0.blocking_lock()
}

pub async fn lock(&self) -> MutexGuard<TopologyController> {
self.0.lock().await
}
Expand Down

0 comments on commit 9ccef3e

Please sign in to comment.