Are NIF resources meant to be destroyed immediately on GC?

Sean Hinde sean.hinde@REDACTED
Wed Nov 25 10:54:12 CET 2020


> 
> This a really nice change. It opens the door to resource destructors being safe for closing external resources like database handles that might take a while.
>  
> Super cool!
>  
> Sorry to disappoint, but no.
> By ”scheduled” I just meant “put in run queue to be executed at a later time”. Destructors are still executed by a normal scheduler threads and not dirty schedulers.

Ah well! I still think it would be pretty handy. It would make that kind of code much easier to get right, safer, and potentially more efficient.

Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20201125/8329ac5d/attachment.htm>


More information about the erlang-questions mailing list