duangua5308
duangua5308
2016-03-21 14:13

在golang中对uint8的读写是原子的吗?

  • it技术
  • 互联网问答
  • IT行业问题
  • 编程语言问答
  • 计算机技术

As in the title, are read and write operations regarding uint8, atomic? Logically it must be a single cpu instruction obviously to read and write for a 8 bit variable. But in any case, two cores could simultaneously read and write from the memory, is it possible to create a stale data this way?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐