vancetang / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

ConfigurationBuilder.useParallelExecutor() hangs the system #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. We had the following code in our system:

reflections = new Reflections(new ConfigurationBuilder()
  .useParallelExecutor()
  .setUrls(ClasspathHelper.getUrlsForPackagePrefix(""))
  .setExecutorServiceSupplier(
     new Supplier<ExecutorService>() {
         public ExecutorService get() {
             return Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
         }
     }
  ));

On many machines the code here completely hangs, on some very fast machines it 
does not. Removing the .useParallelExecutor() line (which really seems to be 
useless given that we provide an ExecutorService) seems to fix the problem.

So while the configuration does not make sense, it probably also should not 
hang the JVM.

What version of the product are you using? On what operating system?

Reflections 0.9.5 RC 2, JDK 1.6.0_23, Tomcat 6.0.32, Windows 7, Eclipse Helios

Original issue reported on code.google.com by thomas.b...@googlemail.com on 6 Apr 2011 at 9:45

GoogleCodeExporter commented 9 years ago
fixed on trunk

Original comment by ronm...@gmail.com on 12 May 2011 at 7:49