providers/session: Use usync.RWMonitor instead of usync.RWLocker

This commit is contained in:
Sasha Koshka 2025-07-07 07:54:19 -04:00
parent 48e8c2d4f0
commit 975d604e2f

View File

@ -11,8 +11,8 @@ import "git.tebibyte.media/sashakoshka/go-util/sync"
func TestSession (test *testing.T) { func TestSession (test *testing.T) {
future := time.Now().Add(5 * time.Minute) future := time.Now().Add(5 * time.Minute)
sessions := make(sessionMap) sessions := make(sessionMap)
sessionLocker := usync.NewRWLocker(sessions) sessionMonitor := usync.NewRWMonitor(sessions)
state := state { sessions: &sessionLocker } state := state { sessions: &sessionMonitor }
session, err := state.newSession(uuid.New(), future) session, err := state.newSession(uuid.New(), future)
if err != nil { test.Fatal(err) } if err != nil { test.Fatal(err) }