developit/workerize

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

Open

#26 ouverte le 20 mars 2018

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)JavaScript (113 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (4 299 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

	worker.expose = methodName => {
		worker[i] = function() {
			return worker.call(methodName, [].slice.call(arguments));
		};
	};

Instead methodName parameter should be used:

	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.

Guide contributeur