- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
// Groovy
// ...
// Globals.visitedImages = ([] as Set).asSynchronized()
// ...
def linkAlreadyVisited
synchronized (Globals.visitedLinks) {
linkAlreadyVisited = iter in Globals.visitedLinks
if (!linkAlreadyVisited) {
Globals.visitedLinks.add(iter)
}
}
if (!linkAlreadyVisited) { // ...