mscdex / node-xxhash

An xxhash binding for node.js
Other
193 stars 28 forks source link

Support worker thread, fix #26 #36

Open yuche opened 4 years ago

yuche commented 4 years ago

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: https://github.com/nodejs/nan/pull/792

fix #26