补全:这段安不安全
补全 safe:字节码原子、或用了 atomic 就安全。
内存模型对比:bytecode_atomic(语言)——CPython 单条字节码在 GIL 下不可分;needs_atomic_type=C++ 才要显式 atomic;guaranteed_ordering、safe(语言, 用没用 atomic)。
补全 safe:字节码原子、或用了 atomic 就安全。
内存模型对比:bytecode_atomic(语言)——CPython 单条字节码在 GIL 下不可分;needs_atomic_type=C++ 才要显式 atomic;guaranteed_ordering、safe(语言, 用没用 atomic)。
全部评论