Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: tvcutsem/clj-worlds
base: 71bdb0071c
...
head fork: tvcutsem/clj-worlds
compare: 70c17bea43
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 7 deletions.
  1. +1 −1  README.md
  2. +6 −6 src/worlds_v0.clj
View
2  README.md
@@ -32,7 +32,7 @@ What is the difference with Clojure's refs and STM, you ask?
Like transactions, worlds isolate and group side-effects.
Unlike transactions:
- * Worlds are first-class entities: worlds can be created, passed around, and "opened" and "closed" at will. Committing a world is an explicit operation and is not tied to the control flow of a block.
+ * Worlds are first-class entities: worlds can be created, passed around, and "opened" and "closed" at will. Committing a world's changes is an explicit operation and is not tied to the control flow of a block.
* Worlds are not a concurrency control mechanism. World commits are not atomic, and while individual world operations are thread-safe, worlds do not support multiple atomic updates and thread isolation.
View
12 src/worlds_v0.clj
@@ -60,13 +60,13 @@
(defn- known? [val]
(not (identical? val DontKnow)))
-;; This function assumes that *this-world* is not bound to nil
-;; (i.e. not the top-level world)
-;; This is currently guaranteed as it is only invoked from world-lookup,
-;; which is only called when *this-world* is not nil
;; This function ensures the "no surprises" property
-;; i.e. a ref does not appear to change spontaneously in
-;; *this-world* when it is updated in one of its parents
+;; i.e. a ref does not appear to change spontaneously in *this-world* when
+;; it is updated in one of its parents.
+;; This function assumes that *this-world* is not bound to nil (i.e. it should
+;; not be called in the top-level world).
+;; This is currently guaranteed as it is only invoked from lookup-in-parent-world,
+;; which is itself only called when *this-world* is not nil (see w-deref)
(defn- mark-as-read [ref val]
;; if ref's :reads value does not exist or is bound to DontKnow
;; in this world, mark it as read before returning it

No commit comments for this range

Something went wrong with that request. Please try again.