introduce RWLocks

This commit is contained in:
Pascal Fischer
2024-04-29 14:03:33 +02:00
parent 07bdf977d0
commit 3085383729
15 changed files with 101 additions and 71 deletions

View File

@@ -12,7 +12,7 @@ import (
// GetEvents returns a list of activity events of an account
func (am *DefaultAccountManager) GetEvents(accountID, userID string) ([]*activity.Event, error) {
unlock := am.Store.AcquireAccountLock(accountID)
unlock := am.Store.AcquireAccountWriteLock(accountID)
defer unlock()
account, err := am.Store.GetAccount(accountID)