concept deadlock in category groovy

appears as: deadlock, deadlocks
Groovy in Action, Second Edition

This is an excerpt from Manning's book Groovy in Action, Second Edition.

Conversely, Java projects often suffer from the deadlock that appears when developers find large sections of untestable code. They cannot easily refactor such a section of code because it has no tests. They cannot easily write tests without refactoring the code to make it more testable. With Groovy’s built-in mocking facilities, you have a better chance of escaping this deadlock.

18.4.1. Testing for deadlocks

Predefined coordination schemes like fork/join and map/filter/reduce are deadlock-free. It’s guaranteed that the task coordination itself never produces a deadlock—the situation when concurrent tasks block each other in a way that prohibits any further progress.

It’s still possible to write code that uses fork/join mechanics and runs into a deadlock anyway, but this wouldn’t be the result of the coordination scheme. Instead it would be an error elsewhere in the code. If the forked code blocks on shared resources, you can still end up with a deadlock in the normal way.

With dataflow concurrency, we cannot guarantee the absence of deadlocks in the coordination itself. The following example demonstrates a dataflow deadlock due to circular assignments: