Limited availability
Atomics.waitAsync()
ì ì ë©ìëë ê³µì ë©ëª¨ë¦¬ ìì¹ìì ë¹ë기ì ì¼ë¡ ë기íê³ Promise
를 ë°íí©ëë¤.
Atomics.wait()
ìë ë¤ë¥´ê², waitAsync
ë ë
¼ ë¸ë¡í¹ì´ë©° ë©ì¸ ì¤ë ëìì ì¬ì©í ì ììµëë¤.
ì°¸ê³ : ì´ ìì
ì ì¤ì§ ê³µì ë Int32Array
í¹ì BigInt64Array
ììë§ ëìí©ëë¤.
Atomics.waitAsync(typedArray, index, value)
Atomics.waitAsync(typedArray, index, value, timeout)
매ê°ë³ì
typedArray
ê³µì ë Int32Array
í¹ì BigInt64Array
.
index
typedArray
ììì ë기íê³ ìë ì¸ë±ì¤.
value
í ì¤í¸í 기ëê°.
timeout
Optional
ë기 ìê°(ë°ë¦¬ì´). ìê°ì´ ëª
ìëì§ ìì¼ë©´ Infinity
ì
ëë¤.
ë¤ì ìì±ì ê°ì§ Object
.
async
value
ìì±ì´ Promise
ì¸ì§ ìëì§ë¥¼ ëíë´ë ë¶ì¸ì
ëë¤.value
async
ê° false
ì´ë©´, "not-equal"
ëë "time-out"
(timeout
매ê°ë³ìê° 0
ì¸ ê²½ì°ìë§) 문ìì´ì¼ ì ììµëë¤. async
ê° true
ì´ë©´ "ok"
ëë "timed-out"
문ìì´ ê°ì¼ë¡ ì´íëë Promise
ê° ë©ëë¤. íë¡ë¯¸ì¤ë ì ë ê±°ë¶ëì§ ììµëë¤.ê³µì ë Int32Array
ìì
const sab = new SharedArrayBuffer(1024);
const int32 = new Int32Array(sab);
ì½ê¸° ì¤ë ëê° 0ì´ ë ê²ì¼ë¡ ììëë ìì¹ 0ìì ë기 ì¤ì
ëë¤. result.value
ì íë¡ë¯¸ì¤ì
ëë¤.
const result = Atomics.waitAsync(int32, 0, 0, 1000);
// { async: true, value: Promise {<pending>} }
ì½ê¸° ì¤ë ë ëë ë¤ë¥¸ ì¤ë ëìì ë©ëª¨ë¦¬ ìì¹ 0ì´ í¸ì¶ëê³ ì´í ê²°ê³¼ "ok"
문ìì´ì íì¸í ì ììµëë¤.
Atomics.notify(int32, 0);
// { async: true, value: Promise {<fulfilled>: 'ok'} }
"ok"
ì¼ë¡ íì¸ëì§ ìëë¤ë©´ 2ê°ì§ ìì¸ì´ ììµëë¤. 첫 ë²ì§¸ ìì¸ì ê³µì ë©ëª¨ë¦¬ ìì¹ì ê°ì´ ììê³¼ ë¤ë¥¸ ê²½ì°ì¸ë° ì´ ê²½ì° value
ë íë¡ë¯¸ì¤ ëì "not-equal"
ì´ ë ë©ëë¤. ë ë²ì§¸ ìì¸ì ìê°ì´ ë§ë£(íììì)ë ê²½ì°ë¡ íë¡ë¯¸ì¤ ê²°ê³¼ë 문ìì´ "time-out"
ì
ëë¤.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4