method Fence.valid
Still believed to hold the lock (renewed within the lease).
Example:
fn main() io, net, time {
let r = cluster.lockFenced("job", body: (f: Fence) => f.valid())
match r {
bool v => print("{v}")
LockTimeout _ => print("busy")
NetError _ => print("unavailable")
}
}Output
true
pub(api) fn valid() -> boolComplexity. O(1).
Since. 1.0.0-beta
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/node.oxl:827