From daeff7143efec441cac55e165db45c416b041ae0 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 17 Sep 2019 00:43:13 +0200 Subject: [PATCH] Enable worker support Switching the declaration is all that's needed to use mmap-io inside Workers (with node >= 10.*), because the library has no static or global data. --- src/mmap-io.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mmap-io.cc b/src/mmap-io.cc index d6b0099..77bd620 100644 --- a/src/mmap-io.cc +++ b/src/mmap-io.cc @@ -373,4 +373,4 @@ NAN_MODULE_INIT(Init) { } -NODE_MODULE(mmap_io, Init) +NAN_MODULE_WORKER_ENABLED(mmap_io, Init);