Skip to content

读写锁的描述是不是错了? #7

Description

@huanjueshacha

https://github.com/gzc426/Java-Interview/blob/master/MySQL%E4%BC%98%E5%8C%96%E7%9C%8B%E8%BF%99%E4%B8%80%E7%AF%87%E5%B0%B1%E5%A4%9F%E4%BA%86.md
文章里面这么描述的
其中read是共享锁,一旦锁定任何客户端都不可读;write是独占/写锁,只有加锁的客户端可读可写,其他客户端既不可读也不可写。锁定的是一张表或几张表。

但是实际上不是应该下面这样吗?

读锁是共享的,即多个客户端可以同时读取同一资源。
写锁是排他的,也就是说写锁会阻塞其他的写锁和读锁。

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions