7

高并发情况下如何保证检查并修改操作是线程安全的

 2 years ago
source link: https://www.v2ex.com/t/800444
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

高并发情况下如何保证检查并修改操作是线程安全的

  vemier · 4 小时 29 分钟前 · 353 次点击
如果这个检查操作比较复杂的话,有什么比较好的解决方案吗
7 条回复    2021-09-07 17:26:30 +08:00

fmumu   4 小时 17 分钟前

CAS 乐观锁

mightofcode   4 小时 12 分钟前

你的并发有多大?

vemier   4 小时 6 分钟前

@fmumu 查询条件比较复杂,比如有 join 查其他表的情况,这种可以用 CAS 吗

vemier   4 小时 4 分钟前

@mightofcode 只是想讨论下这种情况怎么解决,感觉某些业务场景下会有这种问题。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK