<div dir="ltr"><div>Now that my coffee-induced ADHD has subsided I now understand the original text. The word "This" was the part that made things fuzzy for me. Maybe something like the following...</div><div><br></div>"Process independent environments and associated terms that are shared between threads also require explicit synchronization."<br><div><br></div><div>In any case, my question is answered.</div><div><br></div><div>Cheers,</div><div>Dan.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 23, 2015 at 11:20 AM, Sverker Eriksson <span dir="ltr"><<a href="mailto:sverker.eriksson@ericsson.com" target="_blank">sverker.eriksson@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<br>
<br>
<div>On 04/23/2015 05:54 PM, Daniel Goertzen
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Can multiple threads safely use the same
process-independent ErlNifEnv? The documentation isn't clear to
me. From <a href="http://www.erlang.org/doc/man/erl_nif.html" target="_blank">http://www.erlang.org/doc/man/erl_nif.html</a>
...
<div><br>
</div>
"Threads and concurrency<br>
<br>
A NIF is thread-safe without any explicit synchronization as
long as it acts as a pure function and only reads the supplied
arguments. As soon as you write towards a shared state either
through static variables or enif_priv_data you need to supply
your own explicit synchronization. This includes terms in
process independent environments that are shared between
threads. Resource objects will also require synchronization if
you treat them as mutable."<br>
<br>
</div>
<br>
</blockquote></div></div>
Would it be clearer if "terms in" was removed from the third
sentence:<br>
<br>
"This includes process independent environments that are shared
between threads."<br>
<br>
<br>
/Sverker, Erlang/OTP<br>
</div>
</blockquote></div><br></div>