EK
Size: a a a
EK
ИИ
EK
AB
AB
VS
YT
erlang
erts/preloaded/src/erlang.erlэтот модуль
-spec spawn(Module, Function, Args) -> pid() when
Module :: module(),
Function :: atom(),
Args :: [term()].
spawn(_Module, _Function, _Args) ->
erlang:nif_error(undefined).
SP
YT
SP
YT
YT
a
Even if all functions of a module are NIFs, an Erlang module is still needed for two reasons:
- The NIF library must be explicitly loaded by Erlang code in the same module.
- All NIFs of a module must have an Erlang implementation as well.
Normally these are minimal stub implementations that throw an exception. But they can also be used as fallback implementations for functions that do not have native implemenations on some architectures.
YT
Even if all functions of a module are NIFs, an Erlang module is still needed for two reasons:
- The NIF library must be explicitly loaded by Erlang code in the same module.
- All NIFs of a module must have an Erlang implementation as well.
Normally these are minimal stub implementations that throw an exception. But they can also be used as fallback implementations for functions that do not have native implemenations on some architectures.