Skip to content

Commit 15c75ff

Browse files
committed
Add comments and hints
1 parent 6258e48 commit 15c75ff

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

JavaScript/4-exchange.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
'use strict';
22

3+
// Atomics.exchange(typedArray, index, value)
4+
// Atomics.compareExchange(typedArray, index, expectedValue, replacementValue)
5+
36
const buffer = new SharedArrayBuffer(40);
47

58
const array = new Uint32Array(buffer);

JavaScript/5-wait.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
'use strict';
22

3+
// Atomics.wait(typedArray, index, value[, timeout])
4+
// Returns: 'ok' | 'not-equal' | 'timed-out'
5+
36
const buffer = new SharedArrayBuffer(40);
47

58
const array = new Int32Array(buffer);

0 commit comments

Comments
 (0)