Skip to content

Commit a36ebe5

Browse files
committed
Move commits of outputs into threads
1 parent 12f325c commit a36ebe5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/osmdata.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ class multithreaded_processor
270270
}
271271
}
272272
}
273+
for (auto const &output : outputs) {
274+
if (output) {
275+
output->commit();
276+
}
277+
}
273278
}
274279

275280
/**
@@ -286,6 +291,11 @@ class multithreaded_processor
286291
}
287292
}
288293
}
294+
for (auto const &output : outputs) {
295+
if (output) {
296+
output->commit();
297+
}
298+
}
289299
}
290300

291301
/// Runs in a worker thread: Update progress display once per second.
@@ -335,14 +345,6 @@ class multithreaded_processor
335345
}
336346
}
337347

338-
for (auto const &clone : m_clones) {
339-
for (auto const &clone_output : clone) {
340-
if (clone_output) {
341-
clone_output->commit();
342-
}
343-
}
344-
}
345-
346348
timer.stop();
347349

348350
fmt::print(stderr, "\rFinished processing {} {}s in {} s\n\n",

0 commit comments

Comments
 (0)