Closed
Bug 1260432
Opened 8 years ago
Closed 8 years ago
Atomics.pause()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: lth, Assigned: lth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
This is an experimental API proposed in https://github.com/tc39/ecmascript_sharedmem/issues/87 as a replacement for part of the functionality that disappeared when the synchronic proposal was canned. See that bug for some thoughts about how this API would be used. In brief: Atomics.pause = function(n) { count = ToInt32(n) if (count < 0) return false; if (count <= cutoff) wait(); return count < cutoff; } where the meaning of cutoff and wait are platform-dependent, see the referenced bug for some empirical data about what works. The intent is that wait() waits a very short time in an efficient way.
Assignee | ||
Comment 1•8 years ago
|
||
Proof of concept with Mac OS X support
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Proof of concept with Mac OS X support
Assignee | ||
Updated•8 years ago
|
Attachment #8735858 -
Attachment is obsolete: true
Updated•8 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 3•8 years ago
|
||
Further elaboration: in the abstract algorithm, wait() actually takes count as an argument. The meaning of count is that it will be assumed to be an iteration number in a loop external to pause(), normally starting at 0 and increasing through successive iterations of that outer loop. The meaning of wait may depend on the value of count, for example, the higher count is, the longer the wait may be. It is legal for Atomics.pause() always to return false and never wait, the pseudocode does not express that well either. The intent is that Atomics.pause() should not have any observable internal state, in the sense that waiting in one part of the code should not affect waiting in another part of the code, but given that the wait() subroutine has system-dependent meaning it may be hard to specify + enforce that in practice. So at most that is a NOTE.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 4•8 years ago
|
||
This is not in the current spec and needs much more experimentation before it becomes interesting.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•