Revision 7183
Added by ben leinfelder over 12 years ago
src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java | ||
---|---|---|
143 | 143 |
int availableProcessors = Runtime.getRuntime().availableProcessors(); |
144 | 144 |
int nThreads = availableProcessors * 1; |
145 | 145 |
nThreads--; |
146 |
nThreads = Math.max(1, nThreads); |
|
146 | 147 |
executor = Executors.newFixedThreadPool(nThreads); |
147 | 148 |
} |
148 | 149 |
|
Also available in: Unified diff
use at least one thread on single-processor machines.
https://redmine.dataone.org/issues/2800