MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / back_edges

Method back_edges

src/detector/lock/mod.rs:881–901  ·  view source on GitHub ↗

Find all the back-edges in the graph.

(&self)

Source from the content-addressed store, hash-verified

879 graph: Graph<(LockGuardId, LockGuardId), DeadlockPossibility, Directed>,
880}
881
882impl ConflictLockGraph {
883 fn new() -> Self {
884 Self {
885 graph: Graph::new(),
886 }
887 }
888 fn add_node(&mut self, relation: (LockGuardId, LockGuardId)) -> RelationId {
889 self.graph.add_node(relation)
890 }
891
892 fn add_edge(&mut self, a: RelationId, b: RelationId, weight: DeadlockPossibility) {
893 self.graph.add_edge(a, b, weight);
894 }
895
896 fn node_weight(&self, a: RelationId) -> Option<&(LockGuardId, LockGuardId)> {
897 self.graph.node_weight(a)
898 }
899
900 /// Find all the back-edges in the graph.
901 fn back_edges(&self) -> Vec<(RelationId, RelationId)> {
902 let mut back_edges = Vec::new();
903 let nodes = self.graph.node_indices();
904 for start in nodes {

Callers 1

cycle_pathsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected