From 5b8757337121ca285c269d4556d43792de0e968d Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 29 May 2019 17:30:43 -0400 Subject: [PATCH] WIP --- libs/cyclone/atomics.scm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libs/cyclone/atomics.scm b/libs/cyclone/atomics.scm index 986bad8e..dae81541 100644 --- a/libs/cyclone/atomics.scm +++ b/libs/cyclone/atomics.scm @@ -1,13 +1,15 @@ ;; A temporary test file, let's try to get an API going here before writing too much support code +;; +;; see: https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/compare-and-set! +;; initial operations to support: +;; - create atomic +;; - ref atomic +;; - swap, see https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/swap! +;; - compare and swap? +;; +;; +;; once that starts going, double-back to how to allocate shared objects effectively. +;; probably want a (make-shared) +;; may also way a way to allocate multiple shared objects at once (since a minor GC will likely be req'd) -see: https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/compare-and-set! -initial operations to support: -- create atomic -- ref atomic -- swap, see https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/swap! -- compare and swap? - - -once that starts going, double-back to how to allocate shared objects effectively. -probably want a (make-shared) -may also way a way to allocate multiple shared objects at once (since a minor GC will likely be req'd) +;; (atomic? obj)