We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eb70d3 commit 142c0aeCopy full SHA for 142c0ae
native/src/io_pdal_Pipeline.cpp
@@ -34,6 +34,7 @@
34
#include <stdio.h>
35
#include <iostream>
36
#include <string>
37
+#include <mutex>
38
39
#include "io_pdal_Pipeline.h"
40
#include "JavaPipeline.hpp"
@@ -49,6 +50,8 @@ using pdal::PointViewLess;
49
50
using pdal::PointViewPtr;
51
using pdal::pdal_error;
52
53
+std::mutex execute_mutex;
54
+
55
jstring throwInitializationException(JNIEnv *env, const char *message)
56
{
57
jclass Exception = env->FindClass("io/pdal/InitializationException");
@@ -101,6 +104,7 @@ JNIEXPORT void JNICALL Java_io_pdal_Pipeline_execute
101
104
Pipeline *p = getHandle<Pipeline>(env, obj);
102
105
try
103
106
107
+ std::lock_guard<std::mutex> lock (execute_mutex);
108
p->execute();
109
}
110
catch(const pdal_error &pe)
0 commit comments