Add a way to run tippecanoe single-threaded for profiling

This commit is contained in:
Erica Fischer
2024-02-01 11:38:48 -08:00
parent 6a2bce8164
commit aa96f126c1
9 changed files with 43 additions and 12 deletions
+2 -1
View File
@@ -42,6 +42,7 @@
#include "milo/dtoa_milo.h"
#include "errors.hpp"
#include "geometry.hpp"
#include "thread.hpp"
int pk = false;
int pC = false;
@@ -812,7 +813,7 @@ void dispatch_tasks(std::map<zxy, std::vector<std::string>> &tasks, std::vector<
}
for (size_t i = 0; i < CPUS; i++) {
if (pthread_create(&pthreads[i], NULL, join_worker, &args[i]) != 0) {
if (thread_create(&pthreads[i], NULL, join_worker, &args[i]) != 0) {
perror("pthread_create");
exit(EXIT_PTHREAD);
}