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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling no Worker support #15

Open
Conrad2134 opened this issue Jan 19, 2018 · 2 comments
Open

Handling no Worker support #15

Conrad2134 opened this issue Jan 19, 2018 · 2 comments

Comments

@Conrad2134
Copy link

Conrad2134 commented Jan 19, 2018

馃 Based on my first few seconds with workerize and workerize-loader:

In the situations where Workers aren't supported (IE9, Chrome w/ file:/// protocol, etc), the Worker construction fails and throws. This would force the user to try/catch the worker construction and then implement code to run in the main thread in that case (if necessary).

Rather that try/catching that and having to write that fall-back code, it could be handy if workerize could fail gracefully and just proxy through the original functions (wrapped in Promises to preserve the expected API).

Thoughts? I don't have a lot of experience with Workers / workerize, but it came to my mind so I thought I'd bring it up.

Edit: Forgot to mention that workerize and the loader look super cool so far, so great work! 馃憤

@developit
Copy link
Owner

developit commented Jan 22, 2018

Definitely interested in this, for workerize-loader as well. The Promise-wrapping idea is great, too - I hadn't thought of that.

@Conrad2134
Copy link
Author

馃憤 if I get some free time soon I might try to throw something together, then!

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

No branches or pull requests

2 participants