Skip to content

Non-blocking FFI: Progress events #12946

@kriszyp

Description

@kriszyp

When running an asynchronous FFI function (which is now possible, thank you!) that may be performing a long-running operation (in a separate thread), it is often valuable for the FFI function to be able to communicate back to the main JS thread during the course of its execution. Currently, the only communication back to the main thread is the completion of the FFI function, but being able to send multiple updates would be of significant value. This could potentially be done by being able to enqueue some type of "progress" or other notification events into the main JS event queue from the the FFI function that is executing.

Prior art from Node.js includes thread-safe functions and Nan::AsyncProgressWorker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FFIRelated to Foreign Function Interface APIssuggestionsuggestions for new features (yet to be agreed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions