Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v13.x] Backport thread-safe function deadlock detection fix #32948

Commits on Apr 20, 2020

  1. Revert "n-api: detect deadlocks in thread-safe function"

    This reverts commit aeb7084.
    
    The solution creates incorrect behaviour on Windows.
    
    Re: nodejs/node-addon-api#697 (comment)
    Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
    PR-URL: nodejs#32880
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
    Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
    Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
    Gabriel Schulhof committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    62c953e View commit details
    Browse the repository at this point in the history
  2. n-api: detect deadlocks in thread-safe function

    We introduce status `napi_would_deadlock` to be used as a return status
    by `napi_call_threadsafe_function` if the call is made with
    `napi_tsfn_blocking` on the main thread and the queue is full.
    
    Fixes: nodejs#32615
    Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
    PR-URL: nodejs#32860
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Zeyu Yang <himself65@outlook.com>
    Gabriel Schulhof committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    cdd7f4f View commit details
    Browse the repository at this point in the history