bump dependencies (#959)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
bcb80d3ff4
commit
fc9038d8e4
4
go.mod
4
go.mod
|
@ -10,9 +10,9 @@ require (
|
||||||
codeberg.org/gruf/go-errors/v2 v2.0.2
|
codeberg.org/gruf/go-errors/v2 v2.0.2
|
||||||
codeberg.org/gruf/go-kv v1.5.2
|
codeberg.org/gruf/go-kv v1.5.2
|
||||||
codeberg.org/gruf/go-logger/v2 v2.2.1
|
codeberg.org/gruf/go-logger/v2 v2.2.1
|
||||||
codeberg.org/gruf/go-mutexes v1.1.2
|
codeberg.org/gruf/go-mutexes v1.1.3
|
||||||
codeberg.org/gruf/go-runners v1.3.1
|
codeberg.org/gruf/go-runners v1.3.1
|
||||||
codeberg.org/gruf/go-store/v2 v2.0.3
|
codeberg.org/gruf/go-store/v2 v2.0.4
|
||||||
github.com/buckket/go-blurhash v1.1.0
|
github.com/buckket/go-blurhash v1.1.0
|
||||||
github.com/coreos/go-oidc/v3 v3.4.0
|
github.com/coreos/go-oidc/v3 v3.4.0
|
||||||
github.com/disintegration/imaging v1.6.2
|
github.com/disintegration/imaging v1.6.2
|
||||||
|
|
10
go.sum
10
go.sum
|
@ -87,18 +87,16 @@ codeberg.org/gruf/go-kv v1.5.2 h1:B0RkAXLUXYn3Za1NzTXOcUvAc+JUC2ZadTMkCUDa0mc=
|
||||||
codeberg.org/gruf/go-kv v1.5.2/go.mod h1:al6ASW/2CbGqz2YcM8B00tvWnVi1bU1CH3HYs5tZxo4=
|
codeberg.org/gruf/go-kv v1.5.2/go.mod h1:al6ASW/2CbGqz2YcM8B00tvWnVi1bU1CH3HYs5tZxo4=
|
||||||
codeberg.org/gruf/go-logger/v2 v2.2.1 h1:RP2u059EQKTBFV3cN8X6xDxNk2RkzqdgXGKflKqB7Oc=
|
codeberg.org/gruf/go-logger/v2 v2.2.1 h1:RP2u059EQKTBFV3cN8X6xDxNk2RkzqdgXGKflKqB7Oc=
|
||||||
codeberg.org/gruf/go-logger/v2 v2.2.1/go.mod h1:m/vBfG5jNUmYXI8Hg9aVSk7Pn8YgEBITQB/B/CzdRss=
|
codeberg.org/gruf/go-logger/v2 v2.2.1/go.mod h1:m/vBfG5jNUmYXI8Hg9aVSk7Pn8YgEBITQB/B/CzdRss=
|
||||||
codeberg.org/gruf/go-mutexes v1.1.2 h1:AMC1CFV6kMi+iBjR3yQv8yIagG3lWm68U6sQHYFHEf4=
|
codeberg.org/gruf/go-mutexes v1.1.3 h1:6es80V7De7mh5XCfSUzLL5/QlJQsV6+UZkK7Ljq1tew=
|
||||||
codeberg.org/gruf/go-mutexes v1.1.2/go.mod h1:1j/6/MBeBQUedAtAtysLLnBKogfOZAxdym0E3wlaBD8=
|
codeberg.org/gruf/go-mutexes v1.1.3/go.mod h1:1j/6/MBeBQUedAtAtysLLnBKogfOZAxdym0E3wlaBD8=
|
||||||
codeberg.org/gruf/go-pools v1.1.0 h1:LbYP24eQLl/YI1fSU2pafiwhGol1Z1zPjRrMsXpF88s=
|
codeberg.org/gruf/go-pools v1.1.0 h1:LbYP24eQLl/YI1fSU2pafiwhGol1Z1zPjRrMsXpF88s=
|
||||||
codeberg.org/gruf/go-pools v1.1.0/go.mod h1:ZMYpt/DjQWYC3zFD3T97QWSFKs62zAUGJ/tzvgB9D68=
|
codeberg.org/gruf/go-pools v1.1.0/go.mod h1:ZMYpt/DjQWYC3zFD3T97QWSFKs62zAUGJ/tzvgB9D68=
|
||||||
codeberg.org/gruf/go-runners v1.3.1 h1:d/OQMMMiA6yPaDSbSr0/Jc+lucWmm7AiAZjWffpNKVQ=
|
codeberg.org/gruf/go-runners v1.3.1 h1:d/OQMMMiA6yPaDSbSr0/Jc+lucWmm7AiAZjWffpNKVQ=
|
||||||
codeberg.org/gruf/go-runners v1.3.1/go.mod h1:rl0EdZNozkRMb21DAtOL5L4oTfmslYQdZgq2RMMc/H4=
|
codeberg.org/gruf/go-runners v1.3.1/go.mod h1:rl0EdZNozkRMb21DAtOL5L4oTfmslYQdZgq2RMMc/H4=
|
||||||
codeberg.org/gruf/go-sched v1.1.1 h1:YtLSQhpypzuD3HTup5oF7LLWB79gTL4nqW06kH4Vwks=
|
codeberg.org/gruf/go-sched v1.1.1 h1:YtLSQhpypzuD3HTup5oF7LLWB79gTL4nqW06kH4Vwks=
|
||||||
codeberg.org/gruf/go-sched v1.1.1/go.mod h1:SRcdP/5qim+EBT3n3r4aUra1C30yPqV4OJOXuqvgdQM=
|
codeberg.org/gruf/go-sched v1.1.1/go.mod h1:SRcdP/5qim+EBT3n3r4aUra1C30yPqV4OJOXuqvgdQM=
|
||||||
codeberg.org/gruf/go-store/v2 v2.0.2 h1:SZiEchrX9BCLr++dlz21XnoCEZi9u4j/svNQ/FDqC7s=
|
codeberg.org/gruf/go-store/v2 v2.0.4 h1:CpGkJUz7qINh3krjtR6dKmKwJKjprbEKKq4dWF+AemI=
|
||||||
codeberg.org/gruf/go-store/v2 v2.0.2/go.mod h1:bgHRkBHkYpnhbCX0c8wBOVK9X7zOvLBepi9MSgRDlDs=
|
codeberg.org/gruf/go-store/v2 v2.0.4/go.mod h1:vKId86ET4ZzG1tE1dMNkfV66rZkcsyqt64UhKt6EYfc=
|
||||||
codeberg.org/gruf/go-store/v2 v2.0.3 h1:htjXCThi53bmqPYmtrc5aiWOjW4yN5tlHSPRLtsOGgY=
|
|
||||||
codeberg.org/gruf/go-store/v2 v2.0.3/go.mod h1:bgHRkBHkYpnhbCX0c8wBOVK9X7zOvLBepi9MSgRDlDs=
|
|
||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
|
|
|
@ -134,7 +134,7 @@ func NewMap(max, wake int32) MutexMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MAX sets the MutexMap max open locks and wake modulus, returns current values.
|
// SET sets the MutexMap max open locks and wake modulus, returns current values.
|
||||||
// For values less than zero defaults are set, and zero is non-op.
|
// For values less than zero defaults are set, and zero is non-op.
|
||||||
func (mm *MutexMap) SET(max, wake int32) (int32, int32) {
|
func (mm *MutexMap) SET(max, wake int32) (int32, int32) {
|
||||||
mm.mapmu.Lock()
|
mm.mapmu.Lock()
|
||||||
|
@ -257,7 +257,7 @@ func (mm *MutexMap) lock(key string, lt uint8) func() {
|
||||||
return func() {
|
return func() {
|
||||||
mm.mapmu.Lock()
|
mm.mapmu.Lock()
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
go mm.cleanup()
|
mm.cleanup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +289,18 @@ func (mm *MutexMap) cleanup() {
|
||||||
// Decr count
|
// Decr count
|
||||||
mm.count--
|
mm.count--
|
||||||
|
|
||||||
if mm.count%mm.wake == 0 {
|
// Calculate current wake modulus
|
||||||
|
wakemod := mm.count % mm.wake
|
||||||
|
|
||||||
|
if mm.count != 0 && wakemod != 0 {
|
||||||
|
// Fast path => no cleanup.
|
||||||
|
// Unlock, return early
|
||||||
|
mm.mapmu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
if wakemod == 0 {
|
||||||
// Notify queued routines
|
// Notify queued routines
|
||||||
for _, mu := range mm.queue {
|
for _, mu := range mm.queue {
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
|
@ -299,7 +310,7 @@ func (mm *MutexMap) cleanup() {
|
||||||
mm.queue = mm.queue[:0]
|
mm.queue = mm.queue[:0]
|
||||||
}
|
}
|
||||||
|
|
||||||
if mm.count < 1 {
|
if mm.count == 0 {
|
||||||
// Perform evictions
|
// Perform evictions
|
||||||
for _, mu := range mm.evict {
|
for _, mu := range mm.evict {
|
||||||
key := mu.key
|
key := mu.key
|
||||||
|
@ -317,6 +328,7 @@ func (mm *MutexMap) cleanup() {
|
||||||
|
|
||||||
// Unlock map
|
// Unlock map
|
||||||
mm.mapmu.Unlock()
|
mm.mapmu.Unlock()
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// RLockMap acquires a read lock over the entire map, returning a lock state for acquiring key read locks.
|
// RLockMap acquires a read lock over the entire map, returning a lock state for acquiring key read locks.
|
||||||
|
@ -421,7 +433,7 @@ func (st *LockState) lock(key string, lt uint8) func() {
|
||||||
return func() {
|
return func() {
|
||||||
st.mmap.mapmu.Lock()
|
st.mmap.mapmu.Lock()
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
go st.mmap.cleanup()
|
st.mmap.cleanup()
|
||||||
st.wait.Add(-1)
|
st.wait.Add(-1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,7 +445,7 @@ func (st *LockState) UnlockMap() {
|
||||||
}
|
}
|
||||||
st.wait.Wait()
|
st.wait.Wait()
|
||||||
st.mmap.mapmu.Lock()
|
st.mmap.mapmu.Lock()
|
||||||
go st.mmap.cleanup()
|
st.mmap.cleanup()
|
||||||
}
|
}
|
||||||
|
|
||||||
// rwmutex is a very simple *representation* of a read-write
|
// rwmutex is a very simple *representation* of a read-write
|
||||||
|
@ -441,9 +453,9 @@ func (st *LockState) UnlockMap() {
|
||||||
// tracking the lock state for a given map key, which is
|
// tracking the lock state for a given map key, which is
|
||||||
// protected by the map's mutex.
|
// protected by the map's mutex.
|
||||||
type rwmutex struct {
|
type rwmutex struct {
|
||||||
rcnt uint32
|
rcnt int32 // read lock count
|
||||||
lock uint8
|
lock uint8 // lock type
|
||||||
key string
|
key string // map key
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mu *rwmutex) CanLock(lt uint8) bool {
|
func (mu *rwmutex) CanLock(lt uint8) bool {
|
||||||
|
@ -452,15 +464,21 @@ func (mu *rwmutex) CanLock(lt uint8) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mu *rwmutex) Lock(lt uint8) {
|
func (mu *rwmutex) Lock(lt uint8) {
|
||||||
|
// Set lock type
|
||||||
mu.lock = lt
|
mu.lock = lt
|
||||||
|
|
||||||
if lt&lockTypeRead != 0 {
|
if lt&lockTypeRead != 0 {
|
||||||
|
// RLock, increment
|
||||||
mu.rcnt++
|
mu.rcnt++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mu *rwmutex) Unlock() {
|
func (mu *rwmutex) Unlock() {
|
||||||
|
if mu.rcnt > 0 {
|
||||||
|
// RUnlock
|
||||||
mu.rcnt--
|
mu.rcnt--
|
||||||
if mu.rcnt == 0 {
|
} else {
|
||||||
|
// Total unlock
|
||||||
mu.lock = 0
|
mu.lock = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ codeberg.org/gruf/go-kv/format
|
||||||
# codeberg.org/gruf/go-logger/v2 v2.2.1
|
# codeberg.org/gruf/go-logger/v2 v2.2.1
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
codeberg.org/gruf/go-logger/v2/level
|
codeberg.org/gruf/go-logger/v2/level
|
||||||
# codeberg.org/gruf/go-mutexes v1.1.2
|
# codeberg.org/gruf/go-mutexes v1.1.3
|
||||||
## explicit; go 1.14
|
## explicit; go 1.14
|
||||||
codeberg.org/gruf/go-mutexes
|
codeberg.org/gruf/go-mutexes
|
||||||
# codeberg.org/gruf/go-pools v1.1.0
|
# codeberg.org/gruf/go-pools v1.1.0
|
||||||
|
@ -50,7 +50,7 @@ codeberg.org/gruf/go-runners
|
||||||
# codeberg.org/gruf/go-sched v1.1.1
|
# codeberg.org/gruf/go-sched v1.1.1
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
codeberg.org/gruf/go-sched
|
codeberg.org/gruf/go-sched
|
||||||
# codeberg.org/gruf/go-store/v2 v2.0.3
|
# codeberg.org/gruf/go-store/v2 v2.0.4
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
codeberg.org/gruf/go-store/v2/kv
|
codeberg.org/gruf/go-store/v2/kv
|
||||||
codeberg.org/gruf/go-store/v2/storage
|
codeberg.org/gruf/go-store/v2/storage
|
||||||
|
|
Loading…
Reference in New Issue