-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels