[erlang-questions] enif_send from a thread after NIF returns
Tue Oct 26 15:22:20 CEST 2010
On Tue, Oct 26, 2010 at 3:12 PM, Joel Reymont <joelr1@REDACTED> wrote:
> On Oct 26, 2010, at 2:09 PM, Rapsey wrote:
> > Where in the documentation does it say that? I launch my socket accept
> thread in load.
> man erl_driver
> The driver creating the thread has the respon-
> sibility of joining the thread, via erl_drv_thread_join() , before
> driver is unloaded. It is not possible to create "detached"
> i.e., threads that don't need to be joined.
> All created threads need to be joined by the driver before it
> unloaded. If the driver fails to join all threads created before it
> unloaded, the runtime system will most likely crash when the code
> the driver is unloaded.
> In the context of a NIF, "driver unloaded" seems to be "NIF exits". The VM
> consistently crashes when I skip the join after creating threads.
Does unload/reload/upgrade get called? I have printf in those so that I know
what's going on.
More information about the erlang-questions