[erlang-questions] erl_driver vs NIF

Caragea Silviu <>
Tue Dec 6 21:56:10 CET 2016


Hello,

Analyzing the project fast_tls by processone (
https://github.com/processone/fast_tls/blob/master/c_src/fast_tls_drv.c)
it raised me a question:

>From what I know the NIF is the fastest way to call c/c++ code from erlang.
The disadvantage is that you need to return in under 1 ms in order to make
sure the schedulers are not affected.

using erl_driver and  port_control is not the same ? because based on the
documentation this is a sync call that blocks scheduler until the native
method returns.

I'm wrong or not ?

Silviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161206/54c0577d/attachment.html>


More information about the erlang-questions mailing list