royaltm / node-murmurhash-native

MurmurHash native bindings for node
MIT License
48 stars 7 forks source link

fix bug when trying to load this lib in a Worker Thread after load in main thread #32

Open 13661172102 opened 8 months ago

13661172102 commented 8 months ago

test code

const { Worker, isMainThread, parentPort } = require('worker_threads'); let murmurhash = require('murmurhash-native'); //error line

if (isMainThread) { const worker = new Worker(__filename); } else {

}

i fixed this bug in this pr

royaltm commented 8 months ago

Which node version?

13661172102 commented 8 months ago

Which node version?

node v18.17.1