乐观锁和悲观锁

乐观锁和悲观锁 首先, 乐观锁和悲观锁和本身并不是一种具体锁. 而是一种编程的并发控制思想. 原名应该叫做乐观并发控制(Optimistic concurrency control) 简称 OCC 和 悲观并发控制(Pessimistic Concurrency Control) 简称 PCC 什么是锁 维基百科对锁的定义 In computer science, a lock or mutex (from mutual exclusion) is a synchronization primitive: a mechanism that enforces limits on access to a resource when there are many threads of execution. A lock is designed to enforce a mutual exclusion concurrency control policy, and with a variety of possible methods there exists multiple unique implementations for different applications. ...

<span title='2022-10-02 14:05:43 +0800 +0800'>October 2, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;潜水员