[erlang-questions] enif_send from a thread after NIF returns

Paul Davis paul.joseph.davis@REDACTED
Mon Oct 25 18:00:49 CEST 2010


On Mon, Oct 25, 2010 at 11:51 AM, 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
>
>

Quite possible. There's a simple example of sending a term in my
nif-examples [1] repo and a fairly more complex example in Emonk [2].

[1] http://github.com/davisp/nif-examples
[2] http://github.com/davisp/emonk


More information about the erlang-questions mailing list