Skip to content

async_work executor signalling #75

Closed
@skibz

Description

@skibz

using the c api, how would one signal to the async work executor that an invocation of a napi_async_execute_callback has failed? so that when the corresponding napi_async_complete_callback is invoked, it has a napi_status value that indicates a failure?

i am a total c(++) greenhorn, so i'm sorry if this question is inane or a waste of your (collective) time. please let me know if this is an inappropriate place to field this kind of question. i apologise if that is the case.

could the solution be to use (parts of) the c++ api, instead?

the addon i have been developing uses the void* data parameter to pass around a pointer to a struct that i could modify to include a value indicating success or failure to be checked when napi_async_complete_callback is invoked. however, if there is already a way to do this, i'd prefer to use that approach instead.

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