OxL Справочник OxL
РусскийEnglish

data LockTimeout

cluster.lock could not take the lock within the wait time.

Example:

oxl✓ проверяется в CI
fn main() io, net, time {
  let r = cluster.lock("job", wait: 1s) { "ran" }
  match r {
    str s => print(s)
    LockTimeout t => print("could not lock {t.key}")
    NetError _ => print("unavailable")
  }
}
Вывод
ran
pub(api) data LockTimeout

С версии. 1.0.0-beta

Поля

pub(api) key: str

The key of the lock that could not be taken.

Определено в: std/core/node.oxl:780

См. также