Skip to content

Is it possible to return promise in callback? #44

Open
@neko-para

Description

I'm not starting using ffi-rs yet. I'd like to check this feature before starting binding.

Is it possible to return a promise in callback function, and let ffi-rs to sync wait it? Generally, I'd like to call some sync blocking function with runInNewThread inside a callback, and the callback should block until these functions finish.

It's required to call those functions asyncly, or deadlock will happen.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions