RWLocker iface: add TryLock
This commit is contained in:
parent
d30d79a110
commit
f81196eb98
@ -4,19 +4,22 @@ package objecttree
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/anytypeio/any-sync/commonspace/object/acl/aclrecordproto"
|
"github.com/anytypeio/any-sync/commonspace/object/acl/aclrecordproto"
|
||||||
list "github.com/anytypeio/any-sync/commonspace/object/acl/list"
|
"github.com/anytypeio/any-sync/commonspace/object/acl/list"
|
||||||
"github.com/anytypeio/any-sync/commonspace/object/tree/treechangeproto"
|
"github.com/anytypeio/any-sync/commonspace/object/tree/treechangeproto"
|
||||||
"github.com/anytypeio/any-sync/commonspace/object/tree/treestorage"
|
"github.com/anytypeio/any-sync/commonspace/object/tree/treestorage"
|
||||||
"github.com/anytypeio/any-sync/util/keys/symmetric"
|
"github.com/anytypeio/any-sync/util/keys/symmetric"
|
||||||
"github.com/anytypeio/any-sync/util/slice"
|
"github.com/anytypeio/any-sync/util/slice"
|
||||||
"sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type RWLocker interface {
|
type RWLocker interface {
|
||||||
sync.Locker
|
sync.Locker
|
||||||
RLock()
|
RLock()
|
||||||
RUnlock()
|
RUnlock()
|
||||||
|
TryRLock() bool
|
||||||
|
TryLock() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user