Skip to content

Instantly share code, notes, and snippets.

@ideawu
Last active December 2, 2020 04:35
Show Gist options
  • Save ideawu/1d49b039a624bc6bc2632c71c582655c to your computer and use it in GitHub Desktop.
Save ideawu/1d49b039a624bc6bc2632c71c582655c to your computer and use it in GitHub Desktop.
线性一致性定义

线性一致性三大约束

  1. 写操作完成后, 后续的读操作一定会返回不早于该次写操作的新值
  2. 如果某一次读操作返回了新值, 则后续的读操作一定会返回不早于该值的新值
  3. 如果两次操作的时间区间有重叠, 则两次操作不区分前后
@ideawu
Copy link
Author

ideawu commented Dec 2, 2020

Martin Kleppmann 对并发(Concurrency)的定义更精确, 同时也比较隐晦:

For defining concurrency, exact time doesn’t matter: we simply call two operations concurrent if they are both unaware of each other, regardless of the physical time at which they occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment