Skip to content

Commit

Permalink
Merge pull request #2477 from lf-lang/2475-deadlock-was-occurred-with…
Browse files Browse the repository at this point in the history
…-hierarchical-reactor

Fix federated ZDC detection algorithm
  • Loading branch information
edwardalee authored Mar 7, 2025
2 parents 4200889 + a7ee7fe commit 0c503ff
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,12 @@ private boolean _isInZeroDelayCycleInternal(
if (end._isInZeroDelayCycle
|| (end == next && destination == next)
|| visited.contains(destination)) return;
visited.add(destination);
if (setOfDelays.contains(null)) {
// Only if we have a zero-delay connection to destination do we add it to visited.
// If we have a delayed connection to destination, we should not skip a future
// zero-delay
// connection there.
visited.add(destination);
// There is a zero-delay connection to destination.
if (destination == end) {
// Found a zero delay cycle.
Expand Down

0 comments on commit 0c503ff

Please sign in to comment.