developit / developit/workerize
Consider removing expose(), call() and kill() ?
Aperta
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.