Commit 8ecf113
committed
Remove pointless parallel stream processing for classpath entries.
Since we already execute all calls to
NativeImageClassLoaderSupport.LoadClassHandler#handleClassFileName
via the ForkJoinPool.commonPool(), the use of parallelStream() here
does not further increase parallel execution and can be replaced
with a simple forEach without increasing class initialization time.
Additionally, avoiding parallelStream() fixes a deadlock that was
observable when only one CPU core is available (parallel streams
also use the commonPool() and this can lead to a deadlock with our
own use on single core systems).1 parent 0465567 commit 8ecf113
File tree
1 file changed
+1
-1
lines changed- substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted
1 file changed
+1
-1
lines changedsubstratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
| 820 | + | |
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| |||
0 commit comments