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

Class AsyncContext

napi.h:2721–2740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2719#endif
2720
2721class AsyncContext {
2722 public:
2723 explicit AsyncContext(napi_env env, const char* resource_name);
2724 explicit AsyncContext(napi_env env,
2725 const char* resource_name,
2726 const Object& resource);
2727 virtual ~AsyncContext();
2728
2729 AsyncContext(AsyncContext&& other);
2730 AsyncContext& operator=(AsyncContext&& other);
2731 NAPI_DISALLOW_ASSIGN_COPY(AsyncContext)
2732
2733 operator napi_async_context() const;
2734
2735 Napi::Env Env() const;
2736
2737 private:
2738 napi_env _env;
2739 napi_async_context _context;
2740};
2741
2742#if NAPI_HAS_THREADS
2743class AsyncWorker {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected