Bug 437152 – implement worker threadsを使ってみる。 var thread = navigator.newWorkerPool(); thread.createWorker(function(){ setTimeout( clearInterval, 1000, setInterval(postMessageToPool, 5, "thread1")); }.toSource() + "()"); thread.createWorker(function(){ setTimeout( clearInterval, 1000, setInterval(postMessageToPool, 5, "thread2")); }.toSource() + "()"); thread.messageListener = function(message){ console.log(message); }; thread1, thread2, thread2, thread2, t... 続きを読む
[PR]ブログのペットがお留守番
コメント
こんなAPIがあったのか…。
マルチスレッド
スレッド内でXHRやらない、データのやりとりはjson使ったりする
スレッド、navigator.newWorkerPool