OxL Reference

warning actor-cycle

warning Standard: [§8.8]

What it means#

A msg may wait for another actor, but if actor A waits for B while B waits for A, neither message can complete (§8.8). The analyzer reports possible cycles as a warning; it is configurable in [lint].

Example#

oxl✓ checked in CI
actor Left {
  var right: ActorRef<Right>
  msg ping() -> i32 { right.pong() }      // <- actor-cycle
}

actor Right {
  var left: ActorRef<Left>
  msg pong() -> i32 { left.ping() }
}
error
actor-cycle

How to fix#

oxl✓ checked in CI
actor Left {
  var right: ActorRef<Right>
  msg ping() -> i32 { right.pong() }
}

actor Right {
  msg pong() -> i32 { 1 }
}

Break the cycle: make one direction fire-and-forget (~>), return without waiting, or move the shared logic into a third actor.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides