- Timestamp:
- 2017-01-09T08:59:03+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
r11444 r11445 117 117 * See: http://stackoverflow.com/questions/9622599/java-threadpoolexecutor-strategy-direct-handoff-with-queue# 118 118 * 119 * @param executor 119 * @param executor executor for which this queue works 120 120 */ 121 122 121 public void setExecutor(ThreadPoolExecutor executor) { 123 122 this.executor = executor; … … 127 126 128 127 @Override 129 public boolean offer(Runnable e) 130 { 131 if (super.offer(e) == false) 132 { 128 public boolean offer(Runnable e) { 129 if (!super.offer(e)) { 133 130 return false; 134 131 } … … 139 136 int currentPoolSize = executor.getPoolSize(); 140 137 if (currentPoolSize < maximumPoolSize 141 && currentPoolSize >= corePoolSize) 142 { 138 && currentPoolSize >= corePoolSize) { 143 139 executor.setCorePoolSize(currentPoolSize + 1); 144 140 executor.setCorePoolSize(corePoolSize);
Note: See TracChangeset
for help on using the changeset viewer.