developit/workerize

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

Open

#26 opened on 2018年3月20日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)JavaScript (4,299 stars) (113 forks)batch import
enhancementhelp wanted

説明

	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.

コントリビューターガイド

Consider removing expose(), call() and kill() ? · developit/workerize#26 | Good First Issue