Skip to content

Commit 9b03435

Browse files
committed
minor change
1 parent a9d7111 commit 9b03435

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

citydb-io-citygml/src/main/java/org/citydb/io/citygml/writer/CityGMLWriter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ public CityGMLWriter(OutputFile file, WriteOptions options, CityGMLAdapterContex
7777
throw new WriteException("Failed to initialize local cache.", e);
7878
}
7979

80-
service = ExecutorHelper.newFixedAndBlockingThreadPool(1, (options.getNumberOfThreads() > 0 ?
81-
options.getNumberOfThreads() :
82-
Math.max(2, Runtime.getRuntime().availableProcessors())) * 2);
80+
service = ExecutorHelper.newFixedAndBlockingThreadPool(1, 100);
8381
helpers = ThreadLocal.withInitial(() -> new ModelSerializerHelper(this, store, context)
8482
.initialize(options, formatOptions));
8583
countLatch = new CountLatch();

citydb-io-citygml/src/main/java/org/citydb/io/citygml/writer/CityJSONWriter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ public CityJSONWriter(OutputFile file, WriteOptions options, CityGMLAdapterConte
8484
throw new WriteException("Failed to initialize local cache.", e);
8585
}
8686

87-
service = ExecutorHelper.newFixedAndBlockingThreadPool(1, (options.getNumberOfThreads() > 0 ?
88-
options.getNumberOfThreads() :
89-
Math.max(2, Runtime.getRuntime().availableProcessors())) * 2);
87+
service = ExecutorHelper.newFixedAndBlockingThreadPool(1, 100);
9088
helpers = ThreadLocal.withInitial(() -> new ModelSerializerHelper(this, store, adapterContext)
9189
.initialize(options, formatOptions));
9290
countLatch = new CountLatch();

citydb-operation/src/main/java/org/citydb/operation/exporter/Exporter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public Exporter startSession(DatabaseAdapter adapter, ExportOptions options) thr
7676
helpers = ConcurrentHashMap.newKeySet();
7777
service = ExecutorHelper.newFixedAndBlockingThreadPool(options.getNumberOfThreads() > 0 ?
7878
options.getNumberOfThreads() :
79-
Math.max(2, Runtime.getRuntime().availableProcessors()));
79+
Math.max(2, Runtime.getRuntime().availableProcessors()),
80+
1000);
8081

8182
countLatch = new CountLatch();
8283
contexts = ThreadLocal.withInitial(() -> {

0 commit comments

Comments
 (0)