aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/concurrency/atom.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-02-24 17:47:27 -0400
committerEduardo Julian2022-02-24 17:47:27 -0400
commit08518ba37d9094c5cc8683fc404c349e534b8dc9 (patch)
treedc1f68559982af895a8b9a3c4055959a0f98e267 /stdlib/source/library/lux/control/concurrency/atom.lux
parentf27a91a7b67790272578692ea20e2d875dbb3d35 (diff)
Finishing the meta-compiler [Part 4]
Diffstat (limited to 'stdlib/source/library/lux/control/concurrency/atom.lux')
-rw-r--r--stdlib/source/library/lux/control/concurrency/atom.lux10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux
index c865b8e33..5685495a2 100644
--- a/stdlib/source/library/lux/control/concurrency/atom.lux
+++ b/stdlib/source/library/lux/control/concurrency/atom.lux
@@ -18,7 +18,7 @@
(with_expansions [<jvm> (as_is (ffi.import: (java/util/concurrent/atomic/AtomicReference a)
["[1]::[0]"
(new [a])
- (get [] a)
+ (get [] "io" a)
(compareAndSet [a a] boolean)]))]
(for [@.old <jvm>
@.jvm <jvm>]
@@ -61,10 +61,10 @@
(def: .public (read! atom)
(All (_ a) (-> (Atom a) (IO a)))
- (io.io (with_expansions [<jvm> (java/util/concurrent/atomic/AtomicReference::get (:representation atom))]
- (for [@.old <jvm>
- @.jvm <jvm>]
- (<read> 0 (:representation atom))))))
+ (with_expansions [<jvm> (java/util/concurrent/atomic/AtomicReference::get (:representation atom))]
+ (for [@.old <jvm>
+ @.jvm <jvm>]
+ (io.io (<read> 0 (:representation atom))))))
(def: .public (compare_and_swap! current new atom)
(All (_ a) (-> a a (Atom a) (IO Bit)))