Commit
* Changed Runnable to Callable * Use isInterrupted
- Loading branch information
There are no files selected for viewing
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -304,6 +304,11 @@ void contractNodes() { | ||
|
|
||
CHEdgeIterator iter = vehicleAllExplorer.setBaseNode(polledNode); | CHEdgeIterator iter = vehicleAllExplorer.setBaseNode(polledNode); | ||
while (iter.next()) { | while (iter.next()) { | ||
|
|||
if(Thread.currentThread().isInterrupted()){ | |||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
karussell
Member
|
|||
throw new RuntimeException("Thread was interrupted"); | |||
} | |||
|
|||
int nn = iter.getAdjNode(); | int nn = iter.getAdjNode(); | ||
if (prepareGraph.getLevel(nn) != maxLevel) | if (prepareGraph.getLevel(nn) != maxLevel) | ||
continue; | continue; | ||
|
@boldtrn was there a specifc reason you put this check inside this while loop ? would it not be sufficient to put it one level up into the outer while loop ?