(shared, index)
| 7 | |
| 8 | class Mutex { |
| 9 | constructor(shared, index) { |
| 10 | this.shared = shared; |
| 11 | this.index = index; |
| 12 | } |
| 13 | |
| 14 | acquire() { |
| 15 | if (compareExchange(this.shared, this.index, UNLOCKED, LOCKED) === UNLOCKED) { |
nothing calls this directly
no outgoing calls
no test coverage detected