Bug #2800
IllegalArgumentException in MNResourceHandler
Status:
Closed
Priority:
Urgent
Assignee:
Ben Leinfelder
Category:
Metacat
Target version:
Start date:
2012-05-23
Due date:
% Done:
100%
Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:
Description
MNResourceHandler.java on line 146, if there is only a single core the machine has dedicated then MNResourceHandler dies with an IllegalArgumentException exception
offending code:
int availableProcessors = Runtime.getRuntime().availableProcessors();
int nThreads = availableProcessors * 1;
nThreads--;
executor = Executors.newFixedThreadPool(nThreads);
Multithreading is often available and sometimes beneficial even in a single core system (Intel's hyper-threading), but I don't know what this thread pool is used for.
Nevertheless, if availableProcessors is 1, then the newFixedThreadPool should minimally be 1 as well.
History
#1 Updated by Ben Leinfelder over 12 years ago
- Status changed from New to Closed
committed to trunk. should be included in latest unstable hudson build.