developit / developit/workerize

Handling no Worker support

Ouverte
#15 2 commentaires 7 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
4.4k
Forks
87
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

🤔 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! 👍

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.