-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove workerjs #32
base: main
Are you sure you want to change the base?
Remove workerjs #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1.
Reviewable status: complete! 1 of 1 approvals obtained
@RA80533 I've updated this branch by merging from main, but it seems I don't have permission to push the updated minified files. Would you please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing this in a separate branch (so I could fix the merge conflicts) with nodejs v14.x I have noticed that it does not seem to fully work:
global.Worker = require('worker_threads');
should beglobal.Worker = require('worker_threads').Worker;
or I get an error about Worker not being a constructor- even after this change, there is something strange with the message passing between the worker and the main thread -- it seems the server measurements during the download are never stored:
roberto@asimov:~/git/ndt7-js$ node examples/node-client.js
Testing to: {
machine: 'mlab3-mil06.mlab-oti.measurement-lab.org',
locations: { city: 'Milan', country: 'IT' }
}
/home/roberto/git/ndt7-js/examples/node-client.js:23
const serverBw = data.LastServerMeasurement.BBRInfo.BW * 8 / 1000000;
^
TypeError: Cannot read property 'BBRInfo' of undefined
at Object.downloadComplete [as complete] (/home/roberto/git/ndt7-js/examples/node-client.js:23:53)
at Worker.worker.resolve (/home/roberto/git/ndt7-js/src/ndt7.js:153:23)
at Timeout._onTimeout (/home/roberto/git/ndt7-js/src/ndt7.js:168:53)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
Fixes #28
This change is