src: use thread_local to declare modpending · nodejs/node@f3f51e4 · GitHub
Skip to content

Commit f3f51e4

Browse files
Gabriel Schulhoftargos
authored andcommitted
src: use thread_local to declare modpending
The pointer used to hold an incoming dynamically loaded module's `node::node_module` structure needs to be thread-local. So far this was done with `uv_key_set()` and `uv_key_get()`. The language now supports the `thread_local` keyword which makes implementing this a lot cleaner. PR-URL: #28456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 68ed32f commit f3f51e4

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

src/node_binding.cc

Lines changed: 5 additions & 12 deletions

0 commit comments

Comments
 (0)