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 (vectordotdev#21243)

add blocking lock helper to SharedTopologyController
  • Loading branch information
ArunPiduguDD authored and AndrooTheChen committed Sep 23, 2024
1 parent 00a8a6f commit 0740de7
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 0740de7

Please sign in to comment.