developit / developit/workerize

Handling no Worker support

Đang mở
#15 2 bình luận 7 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.4k
Fork
87
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.