NodeSource is excited to announce C++ API - Beta! 🥳 With this new API, you will be able to use all the features and power of N|Solid with your own C++ code.
In the following example, we present a simple native add-on that demonstrates the use of the C++ API. This add-on spawns a thread and from there it creates a repeating timer. In the first timer callback, it gathers the thread specific metrics from the main JS thread whereas in the second callback it takes a 5-second CPU profile. Finally the timer is closed and the thread gracefully exits. Notice the importance of running the C++ API from a non-JS thread to avoid having a performance hit.