MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / TestRef

Function TestRef

test/threadsafe_function/threadsafe_function_unref.cc:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static Value TestRef(const CallbackInfo& info) {
35 Function cb = info[1].As<Function>();
36
37 auto tsfn = ThreadSafeFunction::New(info.Env(), cb, "testRes", 1, 1);
38
39 tsfn.BlockingCall();
40 tsfn.Unref(info.Env());
41 tsfn.Ref(info.Env());
42
43 return info.Env().Undefined();
44}
45
46} // namespace
47

Callers

nothing calls this directly

Calls 4

EnvMethod · 0.80
BlockingCallMethod · 0.80
UnrefMethod · 0.80
RefMethod · 0.80

Tested by

no test coverage detected