File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ The `Napi::AsyncContext` to be destroyed.
45
45
virtual Napi::AsyncContext::~AsyncContext ();
46
46
```
47
47
48
+ ### Env
49
+
50
+ Requests the environment in which the async context has been initially created.
51
+
52
+ ``` cpp
53
+ Napi::Env Env () const ;
54
+ ```
55
+
56
+ Returns the ` Napi::Env ` environment in which the async context has been created.
57
+
48
58
## Operator
49
59
50
60
``` cpp
Original file line number Diff line number Diff line change @@ -3589,6 +3589,10 @@ inline AsyncContext::operator napi_async_context() const {
3589
3589
return _context;
3590
3590
}
3591
3591
3592
+ inline Napi::Env AsyncContext::Env () const {
3593
+ return Napi::Env (_env);
3594
+ }
3595
+
3592
3596
// //////////////////////////////////////////////////////////////////////////////
3593
3597
// AsyncWorker class
3594
3598
// //////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -1784,6 +1784,8 @@ namespace Napi {
1784
1784
1785
1785
operator napi_async_context () const ;
1786
1786
1787
+ Napi::Env Env () const ;
1788
+
1787
1789
private:
1788
1790
napi_env _env;
1789
1791
napi_async_context _context;
You can’t perform that action at this time.
0 commit comments