{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/threads/issues/16","repository_url":"https://api.github.com/repos/WebAssembly/threads","labels_url":"https://api.github.com/repos/WebAssembly/threads/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/threads/issues/16/comments","events_url":"https://api.github.com/repos/WebAssembly/threads/issues/16/events","html_url":"https://github.com/WebAssembly/threads/issues/16","id":231018103,"number":16,"title":"Unordered initialisation from data segments","user":{"login":"rossberg-chromium","id":4247099,"avatar_url":"https://avatars3.githubusercontent.com/u/4247099?v=3","gravatar_id":"","url":"https://api.github.com/users/rossberg-chromium","html_url":"https://github.com/rossberg-chromium","followers_url":"https://api.github.com/users/rossberg-chromium/followers","following_url":"https://api.github.com/users/rossberg-chromium/following{/other_user}","gists_url":"https://api.github.com/users/rossberg-chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/rossberg-chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossberg-chromium/subscriptions","organizations_url":"https://api.github.com/users/rossberg-chromium/orgs","repos_url":"https://api.github.com/users/rossberg-chromium/repos","events_url":"https://api.github.com/users/rossberg-chromium/events{/privacy}","received_events_url":"https://api.github.com/users/rossberg-chromium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-05-24T12:10:08Z","updated_at":"2017-05-30T00:02:38Z","closed_at":null,"body":"The overview currently says about initialisation from data segments:\r\n\r\n> When the imported linear memory is shared, the writes are non-atomic and are not ordered.\r\n\r\nWhat's the rationale for unordered? Is that necessary or desirable? It would make data segments significantly more non-deterministic than everything else proposed. Unlike with a general memcpy operator the memory regions cannot overlap here, so isn't it easy enough to guarantee an ordering?"},"comment":{"url":"https://api.github.com/repos/WebAssembly/threads/issues/comments/304745991","html_url":"https://github.com/WebAssembly/threads/issues/16#issuecomment-304745991","issue_url":"https://api.github.com/repos/WebAssembly/threads/issues/16","id":304745991,"user":{"login":"lukewagner","id":9660325,"avatar_url":"https://avatars2.githubusercontent.com/u/9660325?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewagner","html_url":"https://github.com/lukewagner","followers_url":"https://api.github.com/users/lukewagner/followers","following_url":"https://api.github.com/users/lukewagner/following{/other_user}","gists_url":"https://api.github.com/users/lukewagner/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewagner/subscriptions","organizations_url":"https://api.github.com/users/lukewagner/orgs","repos_url":"https://api.github.com/users/lukewagner/repos","events_url":"https://api.github.com/users/lukewagner/events{/privacy}","received_events_url":"https://api.github.com/users/lukewagner/received_events","type":"User","site_admin":false},"created_at":"2017-05-30T00:02:38Z","updated_at":"2017-05-30T00:02:38Z","body":"Ooph, good point.  Existing asm.js+SAB usage hasn't hit this b/c asm.js doesn't have data segments and so Emscripten pthreads support uses .mem files to init memory.  \r\n\r\nIn the limit, with pure wasm threads, we *will* have a single `Instance` shared between threads so there will only be one instantiation and one memcpy of the data segments.\r\n\r\nFor now, with worker-based threads, we could just say that Emscripten has to emit .mem files (like it used to do anyways).  But if we really wanted to avoid that, it seems reasonable to add a third property-bag argument to `instantiate` that allows opting out of data segment initialization.  I'm pretty sure some other uses for that property bag will emerge"}}
{"actor":{"display_login":"lukewagner"}}