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

Joel Reymont <>
Tue Oct 26 14:08:07 CEST 2010


On Oct 25, 2010, at 5:00 PM, Paul Davis wrote:

> 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].

It seems that the calling code must wait for the spawned thread to finish (join). The documentation states that it's impossible to create detached threads and that all threads must be joined.

How do you spawn a thread from a NIF then, such that it continues to run after the spawning NIF returns?

	Thanks, Joel

---
http://twitter.com/wagerlabs



More information about the erlang-questions mailing list