aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/thread.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/thread.lux')
-rw-r--r--stdlib/source/library/lux/control/thread.lux10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux
index c0a8c5955..266c12afc 100644
--- a/stdlib/source/library/lux/control/thread.lux
+++ b/stdlib/source/library/lux/control/thread.lux
@@ -31,7 +31,7 @@
(array.write! 0 init)
:abstraction)))
- (def: .public (read box)
+ (def: .public (read! box)
{#.doc (example "Reads the current value in the box.")}
(All [! a] (-> (Box ! a) (Thread ! a)))
(function (_ !)
@@ -53,7 +53,7 @@
@.php ("php array read" 0 (:representation box))
@.scheme ("scheme array read" 0 (:representation box))})))
- (def: .public (write value box)
+ (def: .public (write! value box)
{#.doc (example "Mutates the value in the box.")}
(All [a] (-> a (All [!] (-> (Box ! a) (Thread ! Any)))))
(function (_ !)
@@ -104,10 +104,10 @@
(function (_ !)
((ffa !) !))))
-(def: .public (update f box)
+(def: .public (update! f box)
{#.doc (example "Update a box's value by applying a function to it.")}
(All [a !] (-> (-> a a) (Box ! a) (Thread ! a)))
(do ..monad
- [old (read box)
- _ (write (f old) box)]
+ [old (read! box)
+ _ (write! (f old) box)]
(in old)))