andywer / andywer/threads.js

Support for worker-to-worker communication

Aberta
#169 4 comentários 3 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
TypeScript
Estrelas
3.5k
Forks
173
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.