[erlang-questions] enif_send from a thread after NIF returns
Rapsey
rapsey@REDACTED
Mon Oct 25 17:58:31 CEST 2010
yes it is.
Env = enif_alloc_env();
enif_send(NULL,&Process, Env,Msg);
For every enif_send you need an enif_clear_env after it.
enif_clear_env(Env);
Sergej
On Mon, Oct 25, 2010 at 5:51 PM, Joel Reymont <joelr1@REDACTED> wrote:
> Is it possible to use enif_send to asynchronously message back to Erlang
> after the NIF returns?
>
> I'm wondering if enif_thread_create could be used to create a thread that
> continues running and eventually invokes enif_send.
>
> A practical example of using the above would be asynchronous io.
>
> Thanks for any guidance, Joel
>
> ---
> http://twitter.com/wagerlabs
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list