MCPcopy Create free account
hub / github.com/nodejs/nan / AsyncWorker

Method AsyncWorker

nan.h:2010–2019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2008/* abstract */ class AsyncWorker {
2009 public:
2010 explicit AsyncWorker(Callback *callback_,
2011 const char* resource_name = "nan:AsyncWorker")
2012 : callback(callback_), errmsg_(NULL) {
2013 request.data = this;
2014
2015 HandleScope scope;
2016 v8::Local<v8::Object> obj = New<v8::Object>();
2017 persistentHandle.Reset(obj);
2018 async_resource = new AsyncResource(resource_name, obj);
2019 }
2020
2021 virtual ~AsyncWorker() {
2022 HandleScope scope;

Callers

nothing calls this directly

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected