When the Erlang VM beam runs some code written in C,the other processes written in Erlang was not scheduled. For example:
static ERL_NIF_TERM
nifsleep(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
sleep(10);
return enif_make_atom(env, "ok");
}
when you call this C function in Erlang,the other processes was not schedulling normally. I want to know why? Is this a feature or is limited by the implementation(that is,this is a bug)?
The address of the code above is in:https://github.com/davisp/sleepy