[Paraview] Using vtcCoProcessor from different threads
Hermano Lustosa
hermano_lustosa at hotmail.com
Fri Jun 22 16:15:05 EDT 2018
Hello
I have a C++ application that uses catalyst. I am using the class vtkCPProcessor like this (consider that I am using: typedef vtkSmartPointer<vtkCPProcessor> Processor;):
auto processor = Processor::New();
processor->Initialize();
vtkNew<vtkCPPythonScriptPipeline> pipeline;
pipeline->Initialize(path_to_script);
processor->AddPipeline(pipeline.GetPointer());
And then, I have in another part of my code this call:
processorMutex.lock();
processor->CoProcess(dataDescription);
processorMutex.unlock();
It works just fine in a single thread, but if I run the code with multiple threads, even though I make sure there is a single instance of the processor and the calls are protected by mutexes the application crash at the
processor->CoProcess(dataDescription) command with some memory error (usually SIGSEGV).
If I use many instances, the app crash when I try to Initialize the new Processor. Thus, I'd like to know if there is a way to safely call CoProcess from many threads?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180622/6dd624c4/attachment.html>
More information about the ParaView
mailing list