SM
Size: a a a
SM
🦉
🦉
🦉
SM
Any native Node.js module can be loaded directly in Web Workers, but it is strongly recommended not to do so. Most existing native modules have been written assuming single-threaded environment, using them in Web Workers will lead to crashes and memory corruptions.
Note that even if a native Node.js module is thread-safe it's still not safe to load it in a Web Worker because the process.dlopen function is not thread safe.
The only way to load a native module safely for now, is to make sure the app loads no native modules after the Web Workers get started.
SM
SM
🦉
🦉
🦉
SM
SM
SM
🦉
SM
SM
SM