Skip to content

Commit cc0fc99

Browse files
committed
interrupt if error on thread in managed list
1 parent 11924e5 commit cc0fc99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/tech/fastj/systems/collections/ManagedList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void run(Consumer<ArrayList<E>> action) {
139139
} catch (ExecutionException exception) {
140140
throw new IllegalStateException(exception.getCause());
141141
} catch (InterruptedException exception) {
142-
throw new IllegalStateException(exception);
142+
Thread.currentThread().interrupt();
143143
}
144144
}
145145

@@ -172,7 +172,7 @@ public void iterate(Consumer<E> action) {
172172
} catch (ExecutionException exception) {
173173
throw new IllegalStateException(exception.getCause());
174174
} catch (InterruptedException exception) {
175-
throw new IllegalStateException(exception);
175+
Thread.currentThread().interrupt();
176176
}
177177
}
178178

0 commit comments

Comments
 (0)