Q: vtkMultiThreader. Threads. How to use? Example?

Nigel Nunn nNunn at ausport.gov.au
Thu Jul 1 13:04:35 EDT 1999


Lisa writes:

> Thanks sounds like an interesting application!

:-) 

See Diffpack v4.0 ~ November 1999 
http://www.nobjects.com


The "threaded user-interface" technique is described in 
Visual C++ Developers Journal, November 1997

 "Creating a Multi-User Interface Threaded Application in MFC"
  By Bill Stamatakis

http://www.vcdj.com/online/articles/nov97/multiu1.asp


> >No problem yet using four such 32-bit windows, each on their own
> >thread.  When multiple CPUs are available, this arrangement makes 
> >for a rich GUI experience  :-)
> 
> Do you run this on multiple processor platforms? Keep in mind 
> that the data write/write or write/read access conflicts in 
> multithreading won't generally occur when you have multiple 
> threads on the same processor, but will more likely occur when 
> those threads are running on different processors. Not that 
> I am saying that you necessarily have any problems - I am just 
> pointing out that the fact that it runs fine on one processor 
> does not imply that it will run fine on multiple processors.
 

Yes, currently running on dual P-II 350. 

I first struck multiple thread OpenGL difficulties while 
struggling with TGS Open Inventor.  The article mentioned 
above triggered a frenzy of code hackery, which is resulting 
in a neat solution.

So far I play it safe:  We have a set of filters to output 
vtkUnstructuredGrids from Diffpack's finite element grids 
and fields.  During a run of a simulator, whenever a new 
solution field is available (scalar or vector), the solver 
thread (no user interface) sends a message to the appropriate
window:  CFieldView for a new solution field, CMeshView for an 
updated display of the adaptive mesh, etc.  These user-interface 
threads then lock a global mesh or solution structure, filter 
the data into their local Vtk structures and update their 
pipelines.  If one wants to examine a particular field, we can 
either pause the simulator thread, or stop accepting real-time
updates.  Of course with multiple CPUs, the simulator thread can 
work full speed while the researcher gets intense with slicing 
and dicing her Vtk objects.

Thanks for all your input,
Nigel



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list