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

Function Test

test/threadsafe_function/threadsafe_function_ptr.cc:9–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace {
8
9static Value Test(const CallbackInfo& info) {
10 Object resource = info[0].As<Object>();
11 Function cb = info[1].As<Function>();
12 ThreadSafeFunction tsfn =
13 ThreadSafeFunction::New(info.Env(), cb, resource, "Test", 1, 1);
14 tsfn.Release();
15 return info.Env().Undefined();
16}
17
18} // namespace
19

Callers

nothing calls this directly

Calls 2

EnvMethod · 0.80
ReleaseMethod · 0.45

Tested by

no test coverage detected