Skip to content

Be sure that when we close/halt, we wake-up all tasks without effects - #28

Merged
dinosaure merged 1 commit into
mainfrom
fix-close-halt
Sep 19, 2026
Merged

dinosaure merged 1 commit into
mainfrom
fix-close-halt

Conversation

@dinosaure

Copy link
Copy Markdown
Contributor

This patch is a fix about close/halt and ensure:

  1. when we close/halt, we wake up all pending tasks on put/get. We
    can see this fix as a replacement of Miou.Condition.signal to
    Miou.Condition.broadcast
  2. be sure that close/halt don't emit effects and are usable inside a
    finally function (into a Miou.Ownership resource, for instance). For
    that point, we re-implemented a poor-man Miou.Condition with
    Miou.Trigger and ensure that we don't need to Miou.protect (which can
    emit an effect with its internal [Trigger.await]) when we would like
    to wakeup all pending tasks

This patch is a fix about close/halt and ensure:
1) when we close/halt, we wake up **all** pending tasks on put/get. We
   can see this fix as a replacement of Miou.Condition.signal to
   Miou.Condition.broadcast
2) be sure that close/halt don't emit effects and are usable inside a
   finally function (into a Miou.Ownership resource, for instance). For
   that point, we re-implemented a poor-man Miou.Condition with
   Miou.Trigger and ensure that we don't need to Miou.protect (which can
   emit an effect with its internal [Trigger.await]) when we would like
   to wakeup all pending tasks
@dinosaure
dinosaure merged commit d015c45 into main Sep 19, 2026
4 of 5 checks passed
@dinosaure
dinosaure deleted the fix-close-halt branch September 19, 2026 13:44
raphael-proust pushed a commit to ocaml/opam-repository that referenced this pull request Sep 21, 2026
CHANGES:

- Our `Flux.Bqueue.close` is atomic (in the point of view of Miou) (@dinosaure, robur-coop/flux#28, robur-coop/flux#29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant