Re: Shared memory sync/update question

2018-10-11 Thread T.J. Crowder
Hi, On Thu, Oct 11, 2018 at 11:00 AM Lars Hansen wrote: >> 1. Thread A sends a 1k shared block to Thread B via >> `postMessage` >> 2. Thread B writes to various locations in that block directly >> (not via `Atomics.store`) >> 3. Thread B does a `postMessage` to Thread A (without >> referencing

Re: Shared memory sync/update question

2018-10-11 Thread Lars Hansen
On Tue, Oct 2, 2018 at 2:20 PM, T.J. Crowder < tj.crow...@farsightsoftware.com> wrote: > On Mon, Oct 1, 2018 at 4:42 AM Lars Hansen > wrote: > > > > In a browser, postMessage send and receive was always intended to > > create a synchronization edge in the same way a write-read pair is. > >

Re: Shared memory sync/update question

2018-10-02 Thread T.J. Crowder
On Mon, Oct 1, 2018 at 4:42 AM Lars Hansen wrote: > > In a browser, postMessage send and receive was always intended to > create a synchronization edge in the same way a write-read pair is. > http://tc39.github.io/ecmascript_sharedmem/shmem.html#WebBrowserEmbedding > > Not sure where this prose

Re: Shared memory sync/update question

2018-09-30 Thread Lars Hansen
In a browser, postMessage send and receive was always intended to create a synchronization edge in the same way a write-read pair is. http://tc39.github.io/ecmascript_sharedmem/shmem.html#WebBrowserEmbedding Not sure where this prose ended up when the spec was transfered to the es262 document.

Re: Shared memory sync/update question

2018-09-23 Thread T.J. Crowder
On Sun, Sep 23, 2018 at 5:04 PM Allen Wirfs-Brock wrote: > > Does this help? > https://tc39.github.io/ecma262/#sec-shared-memory-guidelines Thanks. Oh, I've read that, of course. I wouldn't be surprised if the answer is in there, but I'm afraid I'm not getting it if so. I'm prepared to believe

Re: Shared memory sync/update question

2018-09-23 Thread Allen Wirfs-Brock
Does this help? https://tc39.github.io/ecma262/#sec-shared-memory-guidelines ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Shared memory sync/update question

2018-09-23 Thread T.J. Crowder
On Sun, Sep 23, 2018 at 5:12 AM Gus Caplan wrote: > > Shared memory doesn't need to "sync", its the same memory. Atomics exists > to provide primitives to help with timing (mostly race conditions). Thanks. Perhaps I'm being misled by my experience with the Java memory model, which is of course

Re: Shared memory sync/update question

2018-09-22 Thread Gus Caplan
Shared memory doesn't need to "sync", its the same memory. Atomics exists to provide primitives to help with timing (mostly race conditions). For example, if you want to update an index in a SharedArrayBuffer (SAB) so that another thread may read it, the safe way is to use Atomics.wait in the

Shared memory sync/update question

2018-09-22 Thread T.J. Crowder
Can anyone on the list help me with the shared memory details question described here: [Does `postMessage` or yielding to the event loop or similar sync shared memory?][1] It seems like Lars T. Hansen's Mandlebrot example [here][2] also expects memory to have been synchronized/updated as of the