OxL Reference

method Fence.valid

Still believed to hold the lock (renewed within the lease).

Example:

oxl✓ checked in CI
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() -> bool

Complexity. 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

See also