<br><div class="gmail_quote"><div class="gmail_quote"><div class="im">On Sun, Oct 31, 2010 at 9:29 AM, Jim Peterson <span dir="ltr">&lt;<a href="mailto:jimcp@cox.net" target="_blank">jimcp@cox.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br></div></div>
John,<br>
Thanks for that, I think the part that needs clarification to me is what exactly is intended by the phrase &quot;If first called from a single thread&quot;.<br>
<br>
To anyone who can illuminate this threadsafe reference:<br>
Can someone explain how there can be a first call not from a single thread? Single threaded use does not constitute &quot;Thread Safe&quot; to me, in fact, if all calls must be from a single thread, I would call it &quot;Not Thread Safe&quot; personally. Are all subsequent calls supposed to specify the same vtkGenericCell? Is the suggestion of &quot;thread safe&quot; suggesting the generated logic may result in multiple threads?<br>

</blockquote></div><div><br>Thank you Jim and Bill for looking in to this. After examining a
backgrace from the crash, I notice that the actual segfault happens on
a call to vtkPointLocator::FreeSearchStructure(), which is called by
vtkPointLocator::FindClosestPoint(). The documentation for
vtkPointLocator::FindClosestPoint() says it is thread-safe with a
similar caveat: &quot;These methods are thread safe if <a href="http://www.vtk.org/doc/release/5.0/html/a01870.html#z1249_3" target="_blank">BuildLocator()</a> is directly or indirectly called from a single thread first.&quot; Still not sure whether &quot;if first called from a single thread&quot; means the first call must be protected by a mutex or if there is some other requirement, or whether I&#39;m supposed to use the same vtkGenericCell or create a new one for each call (or for each thread).<br>

<br>John<br><br></div></div>
</div><br>