MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / AsyncProgressWorkerBase

Method AsyncProgressWorkerBase

napi-inl.h:6665–6683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6663////////////////////////////////////////////////////////////////////////////////
6664template <typename DataType>
6665inline AsyncProgressWorkerBase<DataType>::AsyncProgressWorkerBase(
6666 const Object& receiver,
6667 const Function& callback,
6668 const char* resource_name,
6669 const Object& resource,
6670 size_t queue_size)
6671 : AsyncWorker(receiver, callback, resource_name, resource) {
6672 // Fill all possible arguments to work around ambiguous
6673 // ThreadSafeFunction::New signatures.
6674 _tsfn = ThreadSafeFunction::New(callback.Env(),
6675 callback,
6676 resource,
6677 resource_name,
6678 queue_size,
6679 /** initialThreadCount */ 1,
6680 /** context */ this,
6681 OnThreadSafeFunctionFinalize,
6682 /** finalizeData */ this);
6683}
6684
6685#if NAPI_VERSION > 4
6686template <typename DataType>

Callers

nothing calls this directly

Calls 1

EnvMethod · 0.80

Tested by

no test coverage detected