andywer / andywer/threads.js

Support for worker-to-worker communication

Đang mở
#169 4 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ả

Allow exposing a worker's functionality to other workers using [MessageChannel](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel).

Workers must handle a new meta message transferring a pair of message ports and listen on it / send to it, too, not just the main thread.

# To Do

- Allow communication using arbitrary MessagePort instances
- Allow passing a MessagePort to spawn() (maybe rather create a new function)
- Add Thread.isTerminatable()
- Export MessageChannel & MessagePort

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.