OxL Reference

@ @idle

@idle(d)

Applies to: actor, actor field

Section: §12.5

Syntax

ebnf
Attr        = "@" Path [ "(" [ AttrArgs ] ")" ] ;

Grammar: App. A

Defined in

  • 12.5 Sharded actors — The key is declared in the header (sharded by name
  • 4.9 Attributes — Syntax: @name or @name(arguments) before a declaration, field, parameter or rpc.

Examples

oxl
@idle(ACCOUNT_IDLE)
actor Account sharded by id: AccountId {
  var balance: Money = Money.zero()
  @transient var hits: u64 = 0
  on activate { log.debug("account {id} up") }
  msg deposit(x: Money) { balance += x }
  msg balance() -> Money { balance }
}

Account(id).deposit(amount)

— 12.5 Sharded actors

Related diagnostics

actor-not-hosted, deprecated

See also