{"action":"created","issue":{"url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/36","labels_url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/36/comments","events_url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/36/events","html_url":"https://github.com/lars-t-hansen/ecmascript_sharedmem/issues/36","id":108157776,"number":36,"title":"Allow embedding-specific constraints on futexWait","user":{"login":"lars-t-hansen","id":4823190,"avatar_url":"https://avatars.githubusercontent.com/u/4823190?v=3","gravatar_id":"","url":"https://api.github.com/users/lars-t-hansen","html_url":"https://github.com/lars-t-hansen","followers_url":"https://api.github.com/users/lars-t-hansen/followers","following_url":"https://api.github.com/users/lars-t-hansen/following{/other_user}","gists_url":"https://api.github.com/users/lars-t-hansen/gists{/gist_id}","starred_url":"https://api.github.com/users/lars-t-hansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lars-t-hansen/subscriptions","organizations_url":"https://api.github.com/users/lars-t-hansen/orgs","repos_url":"https://api.github.com/users/lars-t-hansen/repos","events_url":"https://api.github.com/users/lars-t-hansen/events{/privacy}","received_events_url":"https://api.github.com/users/lars-t-hansen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/milestones/1","html_url":"https://github.com/lars-t-hansen/ecmascript_sharedmem/milestones/Stage%202","labels_url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/milestones/1/labels","id":1323003,"number":1,"title":"Stage 2","description":"Issue that has to be resolved before the proposal can go to Stage 2.","creator":{"login":"lars-t-hansen","id":4823190,"avatar_url":"https://avatars.githubusercontent.com/u/4823190?v=3","gravatar_id":"","url":"https://api.github.com/users/lars-t-hansen","html_url":"https://github.com/lars-t-hansen","followers_url":"https://api.github.com/users/lars-t-hansen/followers","following_url":"https://api.github.com/users/lars-t-hansen/following{/other_user}","gists_url":"https://api.github.com/users/lars-t-hansen/gists{/gist_id}","starred_url":"https://api.github.com/users/lars-t-hansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lars-t-hansen/subscriptions","organizations_url":"https://api.github.com/users/lars-t-hansen/orgs","repos_url":"https://api.github.com/users/lars-t-hansen/repos","events_url":"https://api.github.com/users/lars-t-hansen/events{/privacy}","received_events_url":"https://api.github.com/users/lars-t-hansen/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-09-24T22:39:01Z","updated_at":"2015-09-24T22:41:11Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-09-24T15:43:28Z","updated_at":"2015-12-11T03:36:39Z","closed_at":null,"body":"During the September 2015 TC39 meeting, concerns were expressed by several members (perhaps foremost among themYehuda Katz) about allowing blocking on the browser's main thread.\r\n\r\nBrowser implementers have also expressed a concern that browsers are not engineered in such a way that blocking on the main thread is viable: the main thread performs work on behalf of other threads and a blocked main thread can deadlock the system.\r\n\r\nThis work item is about investigating several things:\r\n* whether the API can be extended to allow an embedding to signal that blocking is not allowed on a certain thread (probably easy)\r\n* what the consequences of such a change would be (probably hard)\r\n\r\nThere was agreement at the meeting that we should not bake the concept of \"main thread\" into the spec; something more general is called for.\r\n\r\nThe consequences of such an API are perhaps difficult to predict.  If a program can't block on the main thread it can still spinloop with atomics.  If atomics are taken away on the main thread, the program will tend to spinloop without atomics, creating racy programs that are not portable and probably not reliable in the face of jit optimization.  The only \"fix\" for that is to take away shared memory on the main thread (eg allow it to allocate and transfer a SharedArrayBuffer), but that will cause signficant pain elsewhere.  Etc."},"comment":{"url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/comments/163828257","html_url":"https://github.com/lars-t-hansen/ecmascript_sharedmem/issues/36#issuecomment-163828257","issue_url":"https://api.github.com/repos/lars-t-hansen/ecmascript_sharedmem/issues/36","id":163828257,"user":{"login":"taisel","id":13305116,"avatar_url":"https://avatars.githubusercontent.com/u/13305116?v=3","gravatar_id":"","url":"https://api.github.com/users/taisel","html_url":"https://github.com/taisel","followers_url":"https://api.github.com/users/taisel/followers","following_url":"https://api.github.com/users/taisel/following{/other_user}","gists_url":"https://api.github.com/users/taisel/gists{/gist_id}","starred_url":"https://api.github.com/users/taisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taisel/subscriptions","organizations_url":"https://api.github.com/users/taisel/orgs","repos_url":"https://api.github.com/users/taisel/repos","events_url":"https://api.github.com/users/taisel/events{/privacy}","received_events_url":"https://api.github.com/users/taisel/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T03:36:39Z","updated_at":"2015-12-11T03:36:39Z","body":"The usefulness of AudioWorkers depends on this. Streaming PCM between main thread and an AudioWorker would need this for much lower latency and overhead."}}