Skip to content

Commit baaaa84

Browse files
authored
doc: link threadsafe function from JS function
* doc: link threadsafe function from JS function
1 parent 7f56a78 commit baaaa84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/function.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ functions that were created in JavaScript and passed to the native add-on.
1111
The `Napi::Function` class inherits its behavior from the `Napi::Object` class (for more info
1212
see: [`Napi::Object`](object.md)).
1313

14+
> For callbacks that will be called with asynchronous events from a
15+
> non-JavaScript thread, please refer to [`Napi::ThreadSafeFunction`][] for more
16+
> examples.
17+
1418
## Example
1519

1620
```cpp
@@ -393,3 +397,5 @@ Napi::Value Napi::Function::operator ()(const std::initializer_list<napi_value>&
393397
- `[in] args`: Initializer list of JavaScript values as `napi_value`.
394398

395399
Returns a `Napi::Value` representing the JavaScript value returned by the function.
400+
401+
[`Napi::ThreadSafeFunction`]: ./threadsafe_function.md

0 commit comments

Comments
 (0)