From d94dba973bc6a5d47070856fd34446aa6e6b7993 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Mon, 19 Dec 2022 14:30:11 +0800 Subject: [PATCH] doc: add tip for NODE_MODULE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/45797 Reviewed-By: Gerhard Stöbich Reviewed-By: Chengzhong Wu --- doc/api/addons.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/addons.md b/doc/api/addons.md index 2800c55254cfd0..1e1d4751861d04 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -107,6 +107,9 @@ When building addons with `node-gyp`, using the macro `NODE_GYP_MODULE_NAME` as the first parameter of `NODE_MODULE()` will ensure that the name of the final binary will be passed to `NODE_MODULE()`. +Addons defined with `NODE_MODULE()` can not be loaded in multiple contexts or +multiple threads at the same time. + ### Context-aware addons There are environments in which Node.js addons may need to be loaded multiple