liveBook · Manning

Cycle detection

Cycle detection is a graph-analysis technique for identifying whether traversal returns to a previously visited node, forming a cycle.

How 2 Manning books explain it

Learn Concurrent Programming with Go

Cycle detection is the identification of a closed path in a graph by tracking visited nodes or equivalent traversal state.

How it is used
Diagnoses deadlocks by finding circular waits in resource allocation graphs.
How deep it goes
Explains a visited-node depth-first-search modification and its runtime consequences, but does not detail graph implementation or complexity.
Examples
Uses opposite-order Go mutex locking, Go runtime output, MySQL lock errors, and channel circular waits.
What you can do after
Diagnose/debug with graph traversal, recognize circular waits, and choose termination or error-and-retry responses.

Read how Learn Concurrent Programming with Go explains cycle detection →

Building User-Friendly DSLs

Cycle detection is a graph-analysis technique that determines whether a path or dependency chain returns to a previously visited node.

How it is used
Prevents invalid DSL attribute dependencies from making code generation loop indefinitely.
How deep it goes
Implements recursive chain tracking and diagnostic reporting, while deferring cycle repair to a separate fault-handling strategy.
Examples
Uses mutually dependent attributes, a self-referencing attribute, cycle diagrams, and JavaScript diagnostic listings.
What you can do after
Diagnoses cyclic attribute references and prevents dependency ordering from producing unsafe generated initialization code.

Read how Building User-Friendly DSLs explains cycle detection →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.