OxL Reference

8.6 Cancellation and deadlines

  • Cancellation is cooperative: a cancelled task receives Cancelled from the nearest suspension point. defers and destructors are executed.
  • shield { … } protects a block from cancellation (for finalisation); its duration is limited by the implementation's SHIELD_MAX (5 s by default).
  • The task context ctx contains a deadline. within d sets min(ctx.deadline, now + d). Child tasks and outgoing rpcs inherit the deadline; over the network it is passed in the header grpc-timeout.

Source: docs/spec/oxl-standard.en.md