[erlang-questions] nif driver c code must be reentrant?
Attila Rajmund Nohl
Tue May 21 10:39:16 CEST 2013
2013/5/21 Î¤³çj <wckbluesky@REDACTED>:
> NIFs are called directly by the same scheduler thread that executed the
> calling Erlang code. The calling scheduler will thus be blocked from doing any
> other work until the NIF returns
> That is, calling scheduler is driven by the same thread, so the calling
> will be blocked.
> Then why should we designed our nif code to be reentrant?
I think on SMP systems you can have multiple schedulers.
More information about the erlang-questions