andywer / andywer/threads.js

Support for Shared Web Workers

Đang mở
#401 5 bình luận 3 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
TypeScript
Star
3.5k
Fork
173
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

[Shared Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) are a relatively new feature that allow multiple scripts communicate with a single worker. A good use case would be for example sharing computation between multiple browser tabs.

When it comes to [browser support](https://caniuse.com/sharedworkers), the feature is well supported apart from Safari. It used to have the feature for a while but then it was dropped. The background for the decision is explained at https://bugs.webkit.org/show_bug.cgi?id=149850 .

As we would have a direct use case for the feature in our current project, would it be possible for you to consider inclusion of the feature to threads.js? I am happy to contribute the code if we can agree on the steps. I imagine we would have to expose `SharedWorker` from **threads.js** itself and then also make sure the addition works with the webpack plugin. Safari might require some kind of a strategy as well.

Reference: https://github.com/GoogleChromeLabs/worker-plugin/pull/42 (shared worker support in Google's worker-plugin)

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.