I am a little bit confused, when I create a dirty NIF (for example, by setting the appropriate flags value for the dirty NIF in its ErlNifFunc entry), this creates a dirty scheduler that runs on a dirty thread.
I understand that I can have only N cpu-bond dirty threads as the number of N cpu cores. But, there is also the enif_thread_create function.
What is the difference between them? Is there a limit of threads that I can create using enif_thread_create? Will they be a dirty threads also? I would appreciate a simple code example of using dirty threads through enif_thread_create.