aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/semaphore.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/concurrency/semaphore.lux')
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index d1c6ac1e4..8c31b9796 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -31,7 +31,7 @@
(_.with-cover [/.Semaphore]
($_ _.and
(do {! random.monad}
- [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1))))
+ [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
#let [semaphore (/.semaphore initial-open-positions)]]
(wrap (do promise.monad
[result (promise.time-out 10 (/.wait semaphore))]
@@ -43,7 +43,7 @@
#.None
false)))))
(do {! random.monad}
- [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1))))
+ [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
#let [semaphore (/.semaphore initial-open-positions)]]
(wrap (do {! promise.monad}
[_ (monad.map ! /.wait (list.repeat initial-open-positions semaphore))
@@ -56,7 +56,7 @@
#.None
true)))))
(do {! random.monad}
- [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1))))
+ [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
#let [semaphore (/.semaphore initial-open-positions)]]
(wrap (do {! promise.monad}
[_ (monad.map ! /.wait (list.repeat initial-open-positions semaphore))
@@ -72,7 +72,7 @@
_
false)))))
(do {! random.monad}
- [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1))))
+ [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
#let [semaphore (/.semaphore initial-open-positions)]]
(wrap (do promise.monad
[outcome (/.signal semaphore)]
@@ -90,7 +90,7 @@
(_.with-cover [/.Mutex]
($_ _.and
(do {! random.monad}
- [repetitions (|> random.nat (:: ! map (|>> (n.% 100) (n.max 10))))
+ [repetitions (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
#let [resource (atom.atom "")
expected-As (text.join-with "" (list.repeat repetitions "A"))
expected-Bs (text.join-with "" (list.repeat repetitions "B"))
@@ -147,7 +147,7 @@
_
false)))
(do {! random.monad}
- [limit (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1))))
+ [limit (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
#let [barrier (/.barrier (maybe.assume (/.limit limit)))
resource (atom.atom "")]]
(wrap (do {! promise.monad}