developit / developit/workerize

Consider removing expose(), call() and kill() ?

Aperta
#26 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement help wanted
Lingua principale
JavaScript
Stelle
4.4k
Fork
87
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

``` javascript
worker.expose = methodName => {
worker[i] = function() {
return worker.call(methodName, [].slice.call(arguments));
};
};
```
Instead `methodName` parameter should be used:
``` javascript
worker.expose = methodName => {
worker[methodName] = function() {
return worker.call(methodName, [].slice.call(arguments));
};
};
```
Beside that I don't see why the `call` and `expose` methods are accessible from outside. (Don't assign to worker at all)
The purpose of the `kill` method is also not clear for me.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.