镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Resource is optional in napi_async_init #33153

Description

@legendecas

Maybe we should also think about adapting napi_async_init as it states that the resource is optional. As Node is meanwhile built to require an async resource it seems to be strange that we create an object on the fly if user doesn't provide one.
Removing the null check in napi_async_init would be no issue from ABI point of view but breaking from behavior. Not sure if this should be included in this PR.

Originally posted by @Flarna in #32930

Activity

  1. added
    node-apiIssues and PRs related to Node-API.
    async_hooksIssues and PRs related to the async hooks subsystem.
    on Apr 30, 2020
  2. mhdawson commented on Apr 30, 2020

    @mhdawson
    Member

    @legendecas, @Flarna this is what I'd suggest we do:

    #33181

    I don't think we should change the implementation as it would be breaking which we can't do for N-API but updating the doc does make sense.

  3. mhdawson commented on Apr 30, 2020

    @mhdawson
    Member

    I've left as draft until I get feedback from @legendecas and @Flarna that this makes sense to them as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    async_hooksIssues and PRs related to the async hooks subsystem.node-apiIssues and PRs related to Node-API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions