[vtkusers] Synchronizing thread

Jeff Lee jeff at cdnorthamerica.com
Tue May 20 06:30:49 EDT 2003


R K Shyamprakash wrote:

>Hi,
>         I am using VTK with Java. Some time the program crashes when I try
>to pick the cell, point or actor. These methods get called in my mouse event
>methods.So will it help if I put synchronize lock on the VTK object before
>accessing them?
>
No need to lock the object, just the drawing surface.  I use 
Lock()/UnLock() around the pick method which works fine.  Pass a 
refrerence to your renderWindow into your mouse listener, then call 
_window.Lock()/UnLock().  If your mouse listener is in a different 
package, then provide public wrappers for the Lock/Unlock methods.  Hope 
this is clear,
-Jeff

>
>Thanks
>Shyam
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>  
>





More information about the vtkusers mailing list