Skip to content

Support worker thread, fix #26#36

Open
yuche wants to merge 1 commit intomscdex:masterfrom
yuche:patch-2
Open

Support worker thread, fix #26#36
yuche wants to merge 1 commit intomscdex:masterfrom
yuche:patch-2

Conversation

@yuche
Copy link

@yuche yuche commented Aug 5, 2020

Following code should work:

// index.js
const xxhash = require('xxhash');
const { Worker } = require('worker_threads');
const worker = new Worker('./worker.js');

// worker.js
const xxhash = require('xxhash');

ref: nodejs/nan#792

fix #26

@yuche yuche changed the title Support worker thread, fix #19 Support worker thread, fix #26 Aug 5, 2020
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.

Uncaught Error: Module did not self-register

1 participant