-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding a warning about lengthy work #402
Comments
enif_consume_timeslice would be good to mention too |
Agreed. |
philss
added a commit
to philss/explorer
that referenced
this issue
Mar 31, 2022
This is needed to classify most of the NIF functions as possible "dirty". For smaller sets, those functions should not take more than 1 millisecond to perform. But for larger datasets, it's probably going to take more time. This follows the recommendations from: https://www.erlang.org/doc/man/erl_nif.html#lengthy_work Also see rusterlium/rustler#402
cigrainger
pushed a commit
to elixir-explorer/explorer
that referenced
this issue
Mar 31, 2022
This is needed to classify most of the NIF functions as possible "dirty". For smaller sets, those functions should not take more than 1 millisecond to perform. But for larger datasets, it's probably going to take more time. This follows the recommendations from: https://www.erlang.org/doc/man/erl_nif.html#lengthy_work Also see rusterlium/rustler#402
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rustler is quite mature now and thanks to its great documentation it's easy to get a project working without reading the official erl_nif docs, which unfortunately means that users might not be aware of the big warning box there. While rustler can help eliminate memory errors, the warning about lengthy work is still just as valid, and for many projects, finding a way to do lengthy work correctly will end up being the most challenging part of writing a NIF. I think it would be helpful to:
The text was updated successfully, but these errors were encountered: