<p dir="ltr">Hi,</p>
<p dir="ltr">Does anyone know if synchronization is needed when one calls enif_keep_resource in nif functions and enif_release_resource in a nif background thread? Or in other words: is the ref counting that is used under the hood thread safe?</p>
<p dir="ltr">I ask this because during some refactoring of code in the LMDB driver I'm developing at <a href="https://github.com/zambal/elmdb">https://github.com/zambal/elmdb</a> I stumbled upon a problem that might have been caused by unsynchronized calls to these functions. However,  when I searched github for other code that uses resources , I couldn't find examples that use synchronization, but that might be because it's simply not needed in those libraries, so I'm still not sure.</p>
<p dir="ltr">Thanks,<br>
Vincent<br>
</p>