You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in issue #44's discussion, enif_schedule_nif is currently not exposed by Rustler because it is not known how to expose the function in a compile-time safe way,
as the NIF is supposed to return to the Erlang scheduler right after enif_schedule_nif was called.
My proposal would be to expose enif_schedule_nif in an unsafe context, to ensure that people that want to use it are mindful of if they are using it in the proper way.
In the future, it might be possible to wrap enif_schedule_nif in some way.
An example would be as a preemptive Iterator-consumer, to ensure that the NIF will be split in chunks of O(1), even when performing O(n) or O(n^2) etc iterations.
The text was updated successfully, but these errors were encountered:
As stated in issue #44's discussion,
enif_schedule_nif
is currently not exposed by Rustler because it is not known how to expose the function in a compile-time safe way,as the NIF is supposed to return to the Erlang scheduler right after
enif_schedule_nif
was called.My proposal would be to expose
enif_schedule_nif
in anunsafe
context, to ensure that people that want to use it are mindful of if they are using it in the proper way.In the future, it might be possible to wrap
enif_schedule_nif
in some way.An example would be as a preemptive Iterator-consumer, to ensure that the NIF will be split in chunks of
O(1)
, even when performingO(n)
orO(n^2)
etc iterations.The text was updated successfully, but these errors were encountered: