[erlang-questions] enif_send from a thread after NIF returns
Rapsey
rapsey@REDACTED
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
>
> /erl_drv_thread_create
>
> ---
> The driver creating the thread has the respon-
> sibility of joining the thread, via erl_drv_thread_join() , before
> the
> driver is unloaded. It is not possible to create "detached"
> threads,
> i.e., threads that don't need to be joined.
>
> Warning:
> All created threads need to be joined by the driver before it
> is
> unloaded. If the driver fails to join all threads created before it
> is
> unloaded, the runtime system will most likely crash when the code
> of
> 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.
Sergej
More information about the erlang-questions
mailing list