diff options
| author | 2022-04-28 10:18:27 +0100 | |
|---|---|---|
| committer | 2022-04-28 11:18:27 +0200 | |
| commit | cc5f2e98b763b76f1b0d705efcedaa2ea031ad09 (patch) | |
| tree | 0edadde7c75d1734a603ae057c7cba4f29c68d5d /vendor/github.com/superseriousbusiness/activity/pub/database.go | |
| parent | [bugfix] use Exec to rename media_attachments (#498) (diff) | |
| download | gotosocial-cc5f2e98b763b76f1b0d705efcedaa2ea031ad09.tar.xz | |
[bugfix] Fix possible race condition in federatingdb (#490)
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/superseriousbusiness/activity/pub/database.go')
| -rw-r--r-- | vendor/github.com/superseriousbusiness/activity/pub/database.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/pub/database.go b/vendor/github.com/superseriousbusiness/activity/pub/database.go index 8d3bbd465..5c58c60ce 100644 --- a/vendor/github.com/superseriousbusiness/activity/pub/database.go +++ b/vendor/github.com/superseriousbusiness/activity/pub/database.go @@ -19,12 +19,7 @@ type Database interface { // processes require tight loops acquiring and releasing locks. // // Used to ensure race conditions in multiple requests do not occur. - Lock(c context.Context, id *url.URL) error - // Unlock makes the lock for the object at the specified id available. - // If an error is returned, the lock must have still been freed. - // - // Used to ensure race conditions in multiple requests do not occur. - Unlock(c context.Context, id *url.URL) error + Lock(c context.Context, id *url.URL) (unlock func(), err error) // InboxContains returns true if the OrderedCollection at 'inbox' // contains the specified 'id'. // |
