Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Remove workerjs #32

wants to merge 3 commits into from

Conversation

RA80533
Copy link
Contributor

@RA80533 RA80533 commented Mar 28, 2021

Fixes #28


This change is Reviewable

@robertodauria robertodauria self-requested a review May 14, 2021 23:17
Copy link
Contributor

@robertodauria robertodauria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@robertodauria
Copy link
Contributor

@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 npm run minify and update them, or give maintainers permission to commit changes to this PR? Thanks!

@robertodauria robertodauria self-requested a review February 14, 2022 16:21
Copy link
Contributor

@robertodauria robertodauria left a 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 be global.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)

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.

workerjs is unnecessary
2 participants