Skip to content

Commit 6720d57

Browse files
committed
Create the native threadsafe_function for test only for N-API greater than 3.
1 parent 37b6c18 commit 6720d57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/threadsafe_function/threadsafe_function.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include <thread>
33
#include "napi.h"
44

5+
#if (NAPI_VERSION > 3)
6+
57
using namespace Napi;
68

79
constexpr size_t ARRAY_LENGTH = 10;
@@ -177,3 +179,5 @@ Object InitThreadSafeFunction(Env env) {
177179

178180
return exports;
179181
}
182+
183+
#endif

0 commit comments

Comments
 (0)