[Paraview] Multi-Threading issues
tantics at gmail.com
Tue Jun 1 07:16:32 EDT 2010
I do a similar thing. But I use a Qt thread instead of a timer. The thread
controls the entire progress. I define a iteration steps in the thread,
e.g.,1024. In each iteration, the thread triggers the slot accept() method
(in ParaView3/Qt/Components/pqObjectInspectorWidget), in which the pipeline
is forced to update, then the source will call its RequestData() method and
invoke the simulation program to get the data. Maybe it is more appropriate
to let the simulation the control the entire progress, that is, when one
step simulation is done, then it will notify the ParaView to do the
corresponding rendering stuff. I just do it in the reverse way, because it
is easier to implement.
//the added thread class
// in the method accept() of pqObjectInspectorWidget
//force the pipeline to update
// i add a property to the source
//and any filters used will need this property too
vtkSMSourceProxy * vp = vtkSMSourceProxy::SafeDownCast(source->getProxy());
Then do some other little changes it will work with the simulation program.
I hope this can be of some help.
By the way, I hate the added property "FakePropertyForUpdate" , but I do not
know how to remove it . I have tried many other methods to force the
pipeline to update but got nothing good. And I also want to change the logic
to be more natural, that is, let the simulation program to control the whole
progress. I appreciate any help from anybody.
On Tue, Jun 1, 2010 at 3:06 AM, Biddiscombe, John A. <biddisco at cscs.ch>wrote:
> > It is possible that the timer times out in middle of a progress event
> > which happens while filters are executing.
> OK. This we have detected, though what progress is going on I'm unsure
> about (!) - by which I mean that the only thing paraview should be doing is
> updating our stuff and we block more updates whilst one is happening.
> Question : Is there a mutex of any kind on the update vtk objects, or
> update pipeline stuff which we can make use of to ensure that only one pull
> from the server occurs at any given time?
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the ParaView Wiki at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ParaView