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

POC - Handle when Worker is unsupported #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

POC - Handle when Worker is unsupported #20

wants to merge 1 commit into from

Conversation

Conrad2134
Copy link

This is to show that falling back to the main thread when Workers aren't supported works. There's a lot of TODOs because I wasn't sure the best way to go about a couple of things.

Bundles:

878 B: workerize.js
877 B: workerize.m.js
941 B: workerize.umd.js

// TODO: Is this the full API? Do we need to add anything else?
worker = {
kill() {},
terminate() {},
Copy link
Author

Choose a reason for hiding this comment

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

Should we implement these methods to remove the proxied methods on the worker? Or fine as no-op?

Copy link
Owner

Choose a reason for hiding this comment

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

TBH I'm tempted to not even emulate these since they do nothing. Doing an existence-test for worker.terminate would be a decent way to know if the worker got inlined or not.

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.

None yet

2 participants