Skip to content

Exposing enif_schedule_nif #106

@Qqwy

Description

@Qqwy

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions