Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockNode ¶
type LockNode struct {
// contains filtered or unexported fields
}
LockNode is a node in the lock tree. It is used to provide multi-dimensional read and write lock.
func CreateLockNode ¶
func CreateLockNode(path ...interface{}) *LockNode
CreateLockNode creates a lock node. It will create a linked list of lock node based on given path and return the root node.
@input - path.
@output - root node.
func (*LockNode) Insert ¶
func (node *LockNode) Insert(path ...interface{})
Insert inserts a path to a given node. Note: In multiprocess, Lock(path) must be called prior to this function call.
@input - path.
func (*LockNode) Lock ¶
Lock write locks a given path.
@input - context, path.
@output - function to release lock, error.
Click to show internal directories.
Click to hide internal directories.