Skip to content

guard and with_nack first-class CML events - #51

Merged
lePereT merged 9 commits into
nextfrom
next_guard_nack
Nov 7, 2025
Merged

guard and with_nack first-class CML events#51
lePereT merged 9 commits into
nextfrom
next_guard_nack

Conversation

@lePereT

@lePereT lePereT commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🧑‍💻 Code Refactor
  • ✅ Test

Description

Converts the operation layer to first-class CML events and simplifies dependants.

Key changes:

  • fibers.op: reworked around an Event type with primitive leaves, choice, guard, with_nack, and wrap. Adds poll() and perform_alt(); introduces a compiled synchronisation path and correct nack signalling for losing arms. Exposes new_cond() as a one-shot signal-all primitive.
  • fibers.cond: reduced to a thin wrapper over op.new_cond() (one-shot, signal-all semantics).
  • fibers.waitgroup: now uses op.new_cond() directly; simplified wait_op() blocking.
  • Tests: replaces tests/test_op.lua with comprehensive coverage of base ops, choices, wraps, guards, with_nack (including nested cases), poll(), and perform_alt().

This passes the full test suite.

Related Issues, Tickets & Documents

None.

Screenshots/Recordings

Not applicable.

Manual test

  • yes

Manual test description

Ran the full suite locally; exercised new op behaviours (guards, nacks, poll) and confirmed expected outcomes.

Added tests?

  • yes

Added to documentation?

  • no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

None.

@lePereT
lePereT merged commit 7e5c052 into next Nov 7, 2025
1 check passed
@lePereT
lePereT deleted the next_guard_nack branch November 7, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant