Skip to content

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

Open
13661172102 wants to merge 2 commits intoroyaltm:masterfrom
13661172102:master
Open

fix bug when trying to load this lib in a Worker Thread after load in main thread#32
13661172102 wants to merge 2 commits intoroyaltm:masterfrom
13661172102:master

Conversation

@13661172102
Copy link

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
Copy link
Owner

royaltm commented Feb 23, 2024

Which node version?

@13661172102
Copy link
Author

Which node version?

node v18.17.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants