9.6 Agents
An agent comprises a set of ECMAScript execution contexts, an
An
Some web browsers share a single
While an
Field Name | Value | Meaning |
---|---|---|
[[LittleEndian]] | Boolean | The default value computed for the isLittleEndian parameter when it is needed by the algorithms |
[[CanBlock]] | Boolean | Determines whether the |
[[Signifier]] | Any globally-unique value | Uniquely identifies the |
[[IsLockFree1]] | Boolean | |
[[IsLockFree2]] | Boolean | |
[[IsLockFree8]] | Boolean | |
[[CandidateExecution]] | A |
See the |
[[KeptAlive]] | Initially a new empty |
Once the values of [[Signifier]], [[IsLockFree1]], and [[IsLockFree2]] have been observed by any
The values of [[IsLockFree1]] and [[IsLockFree2]] are not necessarily determined by the hardware, but may also reflect implementation choices that can vary over time and between ECMAScript implementations.
There is no [[IsLockFree4]] property: 4-byte atomic operations are always lock-free.
In practice, if an atomic operation is implemented with any type of lock the operation is not lock-free. Lock-free does not imply wait-free: there is no upper bound on how many machine steps may be required to complete a lock-free atomic operation.
That an atomic access of size n is lock-free does not imply anything about the (perceived) atomicity of non-atomic accesses of size n, specifically, non-atomic accesses may still be performed as a sequence of several separate memory accesses. See
An
9.6.1 AgentSignifier ( )
The abstract operation AgentSignifier takes no arguments. It performs the following steps when called:
- Let AR be the
Agent Record of thesurrounding agent . - Return AR.[[Signifier]].
9.6.2 AgentCanSuspend ( )
The abstract operation AgentCanSuspend takes no arguments. It performs the following steps when called:
- Let AR be the
Agent Record of thesurrounding agent . - Return AR.[[CanBlock]].
In some environments it may not be reasonable for a given