barrier.v 228 Bytes
Newer Older
1
From iris.heap_lang Require Export notation.
2

3
4
Definition newbarrier : val := λ: <>, ref #false.
Definition signal : val := λ: "x", "x" <- #true.
5
Definition wait : val :=
6
  rec: "wait" "x" := if: !"x" then #() else "wait" "x".