Skip to main content

Module lock

Module lock 

Source
Expand description

Cypress locks. Locks: what Cypress gives a transaction to coordinate with.

A lock belongs to a transaction and is released when it ends. There is no way to take one without a transaction — the cluster answers A valid master transaction is required — so Client::lock refuses before asking when the client is not in one.

Writing to a node takes an exclusive lock on its own; taking one explicitly is for saying now rather than later, which is what makes it a coordination primitive rather than an implementation detail.

Structs§

Lock
A lock held by a transaction.

Enums§

LockMode
What a lock leaves other transactions able to do.