aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/control/concurrency/stm.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/concurrency/stm.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/control/concurrency/stm.lux b/stdlib/source/lux/control/concurrency/stm.lux
index 3065d8033..3c4c26f59 100644
--- a/stdlib/source/lux/control/concurrency/stm.lux
+++ b/stdlib/source/lux/control/concurrency/stm.lux
@@ -46,7 +46,7 @@
(def: (write! new-value var)
(All [a] (-> a (Var a) (IO Any)))
- (do io.monad
+ (do {@ io.monad}
[#let [var' (:representation var)]
(^@ old [old-value observers]) (atom.read var')
succeeded? (atom.compare-and-swap old [new-value observers] var')]
@@ -216,7 +216,7 @@
(def: (issue-commit commit)
(All [a] (-> (Commit a) (IO Any)))
(let [entry [commit (promise.promise [])]]
- (do io.monad
+ (do {@ io.monad}
[|commits|&resolve (atom.read pending-commits)]
(loop [[|commits| resolve] |commits|&resolve]
(do @
@@ -237,14 +237,14 @@
(let [[stm-proc output resolve] commit
[finished-tx value] (stm-proc fresh-tx)]
(if (can-commit? finished-tx)
- (do io.monad
+ (do {@ io.monad}
[_ (monad.map @ commit-var! finished-tx)]
(resolve value))
(issue-commit commit))))
(def: init-processor!
(IO Any)
- (do io.monad
+ (do {@ io.monad}
[flag (atom.read commit-processor-flag)]
(if flag
(wrap [])