{"action":"created","issue":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/756","repository_url":"https://api.github.com/repos/slightlyoff/ServiceWorker","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/756/comments","events_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/756/events","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/756","id":109137556,"number":756,"title":"consider allowing multiple worker thread instances for a single registration","user":{"login":"wanderview","id":1256526,"avatar_url":"https://avatars.githubusercontent.com/u/1256526?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/milestones/3","html_url":"https://github.com/slightlyoff/ServiceWorker/milestones/Version%202","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/milestones/3/labels","id":825216,"number":3,"title":"Version 2","description":null,"creator":{"login":"KenjiBaheux","id":6354698,"avatar_url":"https://avatars.githubusercontent.com/u/6354698?v=3","gravatar_id":"","url":"https://api.github.com/users/KenjiBaheux","html_url":"https://github.com/KenjiBaheux","followers_url":"https://api.github.com/users/KenjiBaheux/followers","following_url":"https://api.github.com/users/KenjiBaheux/following{/other_user}","gists_url":"https://api.github.com/users/KenjiBaheux/gists{/gist_id}","starred_url":"https://api.github.com/users/KenjiBaheux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenjiBaheux/subscriptions","organizations_url":"https://api.github.com/users/KenjiBaheux/orgs","repos_url":"https://api.github.com/users/KenjiBaheux/repos","events_url":"https://api.github.com/users/KenjiBaheux/events{/privacy}","received_events_url":"https://api.github.com/users/KenjiBaheux/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":25,"state":"open","created_at":"2014-10-14T08:25:32Z","updated_at":"2016-06-03T16:52:10Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-09-30T17:07:59Z","updated_at":"2016-06-07T16:46:02Z","closed_at":null,"body":"Currently gecko has a bug where multiple service worker threads can be spun up for the same registration.  This can happen when windows in separate child processes open documents controlled by the same registration.  Per the spec, the FetchEvents should be dispatched to the same worker instance.  In practice, we spin up different work threads for each child process and dispatch there.\r\n\r\nWhile discussing how to fix this, we started to wonder if its really a problem.  Service workers already discourage shared global state since the thread can be killed at any time.  If the service worker script is solely using Cache, IDB, etc to store state, then running multiple thread instances is not a problem.\r\n\r\nIt seems the main issue where this could cause problems is for code that wants to use global variables while holding the worker alive using waitUntil() or respondWith().  This is theoretically observable by script, but seems to have limited useful applications.\r\n\r\nHow would people feel about loosening the current spec to allow a browser to spin up more than one worker thread for a single registration?  When to execute multiple threads and how many would be up to the browser implementation."},"comment":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/comments/224341430","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/756#issuecomment-224341430","issue_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/756","id":224341430,"user":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T16:46:02Z","updated_at":"2016-06-07T16:46:02Z","body":"By sending global state via `postMessage()` or `respondWith()`? If so, well, I suppose it could be a recommendation."}}
{"actor":{"display_login":"delapuente"}}