Optimistic vs. Pessimistic locking

前端 未结 10 1262
庸人自扰
庸人自扰 2020-11-21 22:35

I understand the differences between optimistic and pessimistic locking. Now could someone explain to me when I would use either one in general?

And does the answer

10条回答
  •  说谎
    说谎 (楼主)
    2020-11-21 23:12

    In addition to what's been said already:

    • It should be said that optimistic locking tends to improve concurrency at the expense of predictability.
    • Pessimistic locking tends to reduce concurrency, but is more predictable. You pay your money, etc ...

提交回复
热议问题