-
Notifications
You must be signed in to change notification settings - Fork 407
Closed
Labels
Description
Environment Information
- OS [e.g. Mac, Arch, Windows 10]: Alpine (docker)
- Node Version [e.g. 8.2.1]: node:12-alpine
- NPM Version [e.g. 5.4.2]: v5
- C++ Toolchain [e.g. Visual Studio, llvm, g++]:
- node-rdkafka version [e.g. 2.3.3]: 2.8.1
Steps to Reproduce
const {
Worker, isMainThread
} = require('worker_threads');
const kafka = require('node-rdkafka');
if (isMainThread) {
// Brand new worker
new Worker(__filename);
}
Additional context
Even though this issue relates to nodejs internal implementation of workers, nodejs developers wont fix it. However it can be fixed by making native module context-aware. Here is an example for node-lzo: schroffl/node-lzo#11