data Fence
The fencing token of a held lock (cluster.lockFenced).
Example:
fn main() io, net, time {
let r = cluster.lockFenced("job", body: (f: Fence) => "{f.key} {f.token > 0}")
match r {
str s => print(s)
LockTimeout _ => print("busy")
NetError _ => print("unavailable")
}
}Output
job true
pub(api) data FenceSince. 1.0.0-beta
Fields
pub(api) key: str | The key of the held lock. |
pub(api) token: i64 | Fencing token: grows with every acquisition of the lock. |
Methods
valid | () -> boolStill believed to hold the lock (renewed within the lease). |
Defined in: std/core/node.oxl:801