[erlang-questions] enif_send from a thread after NIF returns
Paul Davis
paul.joseph.davis@REDACTED
Mon Oct 25 19:51:38 CEST 2010
On Mon, Oct 25, 2010 at 12:08 PM, Joel Reymont <joelr1@REDACTED> wrote:
> With a combination of NIF, detaching a thread and enif_send, why would you ever need a port driver?
>
> Are port drivers obsolete?
>
> ---
> http://twitter.com/wagerlabs
>
>
Its a different model really. NIF's have started to allow people to
re-implement almost anything a port driver can do, as well as things
they can't. Though, the question is more about technical debt at this
point.
For instance, if you had a situation that could be solved as a port
using the async thread pool, why would you want to re-implement that
as a NIF? NIF's are extremely awesome and its easy to assume they're
better for everything but there are definitely cases where a port
driver is a better fit.
HTH,
Paul Davis
More information about the erlang-questions
mailing list