Closed jfbastien closed 7 years ago
"Same" is intended to convey that when you access the object (read the list of waiters or write the list of waiters from within the appropriate critical section) then those changes become observable to other agents (when they are in the appropriate critical section) regardless of in which order and at what time those agents obtained the WaiterList objects. I don't know what "when invoked concurrently it could return different results" means since the spec says it's not allowed to do that (it must be the "same").
I'm happy if you can suggest something more precise, but I am a bit mystified that you are mystified here :)
Edit: clarification.
Please file issue against ecma262 if you feel the current prose is still unclear. https://tc39.github.io/ecma262/#sec-getwaiterlist.
GetWaiterList
says:What does "same" mean? When invoked concurrently it could return different results. Is there even a way to observe same-ness besides having a coherent order (i.e. Lamport timestamps)?
Can different threads observe different interleavings in the WaiterList? (I assume not).