[vtkusers] FindCell in multithreaded application
Jim Peterson
jimcp at cox.net
Sat Oct 30 14:39:29 EDT 2010
John Haiducek wrote:
> Does anyone have experience using vtkDataSet::FindCell() in a
> multithreaded environment? Any help would be appreciated.
>
> On Wed, Oct 27, 2010 at 12:40 PM, John Haiducek <jhaiduce at gmail.com
> <mailto:jhaiduce at gmail.com>> wrote:
>
> I have a multithreaded application which calls
> vtkDataSet::FindCell many times. Even though I'm using the
> thread-safe version of FindCell, I get occasional segmentation
> faults when I call FindCell, unless I protect the calls to
> FindCell with a pthread_mutex_lock(). As I understand it, FindCell
> shouldn't need this as long as the first call to FindCell on that
> dataset is protected with a pthread_mutex_lock. Is this correct?
> Is there some way to safely use FindCell() in parallel within a
> threaded application?
>
John,
Just curious, where did you get the original premise that protecting the
first call to FindCell would make all calls threadsafe? Was that in a
VTK usage recomendation or document somewhere?
Thanks,
Jim
More information about the vtkusers
mailing list