Skip to content

Commit

Permalink
awake thread before writing next feature in SequentialWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Jul 3, 2024
1 parent acaaae6 commit 846a38d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public void write(Feature feature, BiConsumer<Boolean, Throwable> 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));
Expand Down

0 comments on commit 846a38d

Please sign in to comment.