aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/control/concurrency/atom.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/concurrency/atom.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/control/concurrency/atom.lux b/stdlib/source/lux/control/concurrency/atom.lux
index 04517cc3e..3920c0214 100644
--- a/stdlib/source/lux/control/concurrency/atom.lux
+++ b/stdlib/source/lux/control/concurrency/atom.lux
@@ -13,15 +13,15 @@
[type
abstract]])
-(with-expansions [<jvm> (as-is (host.import: (java/util/concurrent/atomic/AtomicReference a)
+(with_expansions [<jvm> (as_is (host.import: (java/util/concurrent/atomic/AtomicReference a)
["#::."
(new [a])
(get [] a)
(compareAndSet [a a] boolean)]))]
- (for {@.old <jvm>
- @.jvm <jvm>}
-
- (as-is)))
+ (for {@.old <jvm>
+ @.jvm <jvm>}
+
+ (as_is)))
(abstract: #export (Atom a)
(for {@.old
@@ -60,7 +60,7 @@
("js array read" 0 (:representation atom))
})))
- (def: #export (compare-and-swap current new atom)
+ (def: #export (compare_and_swap current new atom)
{#.doc (doc "Only mutates an atom if you can present its current value."
"That guarantees that atom was not updated since you last read from it.")}
(All [a] (-> a a (Atom a) (IO Bit)))
@@ -87,7 +87,7 @@
(do io.monad
[old (read atom)
#let [new (f old)]
- swapped? (compare-and-swap old new atom)]
+ swapped? (compare_and_swap old new atom)]
(if swapped?
(wrap new)
(recur [])))))