node/test/node-api/test_threadsafe_function
Gabriel Schulhof fd4320c49f
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: https://github.com/nodejs/node/issues/32615
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/32860
Backport-PR-URL: https://github.com/nodejs/node/pull/32948
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-04-28 08:55:19 +02:00
..
binding.c n-api: detect deadlocks in thread-safe function 2020-04-28 08:55:19 +02:00
binding.gyp n-api: detect deadlocks in thread-safe function 2020-04-28 08:55:19 +02:00
test.js n-api: detect deadlocks in thread-safe function 2020-04-28 08:55:19 +02:00