--trace-atomics-wait
稳定性: 0 - 已弃用
¥Stability: 0 - Deprecated
将 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
给定的线程标识¥The thread id as given by
worker_threads.threadId
-
有问题的
SharedArrayBuffer
的基地址,以及传给Atomics.wait()
的索引对应的字节偏移量¥The base address of the
SharedArrayBuffer
in question, as well as the byte offset corresponding to the index passed toAtomics.wait()
-
传给
Atomics.wait()
的期望值¥The expected value that was passed to
Atomics.wait()
-
传给
Atomics.wait
的超时¥The timeout passed to
Atomics.wait