--trace-atomics-wait
稳定性: 0 - 已弃用
将对 Atomics.wait() 的调用简要摘要打印到标准错误。输出可能如下所示:
【Print short summaries of calls to Atomics.wait() to stderr.
The output could look like this:】
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) started
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) did not wait because the values mismatched
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) started
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) timed out
(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) started
(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) started
(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) was woken up by another thread
(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) was woken up by another thread 这里的字段对应于:
【The fields here correspond to:】
- 由
worker_threads.threadId提供的线程 ID - 相关
SharedArrayBuffer的基地址,以及对应传递给Atomics.wait()的索引的字节偏移 - 传递给
Atomics.wait()的期望值 - 传递给
Atomics.wait的超时