aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/control/concurrency/semaphore.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/concurrency/semaphore.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/lux/control/concurrency/semaphore.lux b/stdlib/source/lux/control/concurrency/semaphore.lux
index c69859138..3edcbd332 100644
--- a/stdlib/source/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/lux/control/concurrency/semaphore.lux
@@ -28,10 +28,10 @@
#waiting-list (Queue (Resolver Any))})
(abstract: #export Semaphore
- {#.doc "A tool for controlling access to resources by multiple concurrent processes."}
-
(Atom State)
+ {#.doc "A tool for controlling access to resources by multiple concurrent processes."}
+
(def: most-positions-possible
(.nat (:: i.interval top)))
@@ -114,10 +114,10 @@
)
(abstract: #export Mutex
- {#.doc "A mutual-exclusion lock that can only be acquired by one process at a time."}
-
Semaphore
+ {#.doc "A mutual-exclusion lock that can only be acquired by one process at a time."}
+
(def: #export (mutex _)
(-> Any Mutex)
(:abstraction (semaphore 1)))
@@ -143,13 +143,13 @@
(type: #export Limit (:~ (refinement.type limit)))
(abstract: #export Barrier
- {#.doc "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier."}
-
{#limit Limit
#count (Atom Nat)
#start-turnstile Semaphore
#end-turnstile Semaphore}
+ {#.doc "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier."}
+
(def: #export (barrier limit)
(-> Limit Barrier)
(:abstraction {#limit limit