mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Gather the results from each thread *after* the thread finishes
This commit is contained in:
+4
-4
@@ -1012,6 +1012,10 @@ void dispatch_tasks(std::map<zxy, std::vector<std::string>> &tasks, std::vector<
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
void *retval;
|
||||
|
||||
if (pthread_join(pthreads[i], &retval) != 0) {
|
||||
perror("pthread_join");
|
||||
}
|
||||
|
||||
*minlat = std::min(*minlat, args[i].minlat);
|
||||
*minlon = std::min(*minlon, args[i].minlon);
|
||||
*maxlat = std::max(*maxlat, args[i].maxlat);
|
||||
@@ -1019,10 +1023,6 @@ void dispatch_tasks(std::map<zxy, std::vector<std::string>> &tasks, std::vector<
|
||||
*minlon2 = std::min(*minlon2, args[i].minlon2);
|
||||
*maxlon2 = std::max(*maxlon2, args[i].maxlon2);
|
||||
|
||||
if (pthread_join(pthreads[i], &retval) != 0) {
|
||||
perror("pthread_join");
|
||||
}
|
||||
|
||||
for (auto ai = args[i].outputs.begin(); ai != args[i].outputs.end(); ++ai) {
|
||||
if (outdb != NULL) {
|
||||
mbtiles_write_tile(outdb, ai->first.z, ai->first.x, ai->first.y, ai->second.data(), ai->second.size());
|
||||
|
||||
Reference in New Issue
Block a user