Skip to content

Commit

Permalink
fix comments and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HDT3213 committed Jun 14, 2021
1 parent 8a04fe6 commit ef5639f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Key Features:

- support string, list, hash, set, sorted set
- ttl
- publish/suscribe
- publish/subscribe
- geo
- aof and aof rewrite
- Transaction. The `multi` command is Atomic and Isolated. If any errors are encountered during execution, godis will rollback the executed commands
Expand Down
1 change: 1 addition & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Godis 是一个用 Go 语言实现的 Redis 服务器。本项目旨在为尝试
关键功能:
- 支持 string, list, hash, set, sorted set 数据结构
- 自动过期功能(TTL)
- 发布订阅
- 地理位置
- AOF 持久化及AOF重写
- 事务. Multi 命令开启的事务具有`原子性``隔离性`. 若在执行过程中遇到错误, godis 会回滚已执行的命令
Expand Down
2 changes: 2 additions & 0 deletions datastruct/lock/lock_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (locks *Locks) RUnLocks(keys ...string) {
}
}

// RWLocks locks write keys and read keys together. allow duplicate keys
func (locks *Locks) RWLocks(writeKeys []string, readKeys []string) {
keys := append(writeKeys, readKeys...)
indices := locks.toLockIndices(keys, false)
Expand All @@ -146,6 +147,7 @@ func (locks *Locks) RWLocks(writeKeys []string, readKeys []string) {
}
}

// RWUnLocks unlocks write keys and read keys together. allow duplicate keys
func (locks *Locks) RWUnLocks(writeKeys []string, readKeys []string) {
keys := append(writeKeys, readKeys...)
indices := locks.toLockIndices(keys, true)
Expand Down

0 comments on commit ef5639f

Please sign in to comment.