<div dir="ltr">I had a look in the doc but I can't figure exactly how much a nif resource could live outside the process that created it, ie. how others processes can write/read to it and how to make sure the resource will be accessible to them.<div><br></div><div>So I created a nif resource that have the following properties:</div><div><span style="line-height:1.5">- it  is ref counted, each time a call is made to it, the counter is incremented and decremented when it return.</span><br></div><div>- the process that create it will live until the vm is closed</div><div>- write and reads to the resource are thread safe, at least the functions that use resource</div><div><br></div><div>For now I was thinking to share this resources between others processes via an ETS table. But I am wondering if instead it shouldn't be safer to makes all the call via a nif. With the result of creating some kind of bottleneck. Is there any other pattern I should follow? How does ETS which in my understanding is a nif?</div><div><br></div><div>- benoît</div></div>