From 846a38dacdf8b1f18ad55b4ab16a85d4f367cdd7 Mon Sep 17 00:00:00 2001 From: Claus Nagel Date: Wed, 3 Jul 2024 15:34:34 +0200 Subject: [PATCH] awake thread before writing next feature in SequentialWriter --- .../java/org/citydb/cli/exporter/util/SequentialWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/citydb-cli/src/main/java/org/citydb/cli/exporter/util/SequentialWriter.java b/citydb-cli/src/main/java/org/citydb/cli/exporter/util/SequentialWriter.java index ad09808c..6bb23752 100644 --- a/citydb-cli/src/main/java/org/citydb/cli/exporter/util/SequentialWriter.java +++ b/citydb-cli/src/main/java/org/citydb/cli/exporter/util/SequentialWriter.java @@ -79,9 +79,9 @@ public void write(Feature feature, BiConsumer onCompletion) CacheEntry entry; while ((entry = cache.remove(currentId)) != null) { + condition.signal(); writer.write(entry.feature).whenComplete(entry.onCompletion); currentId++; - condition.signal(); } } else { cache.put(sequenceId, new CacheEntry(feature, onCompletion));