Skip to content

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.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 04, 2009
@richhickey richhickey create branch for 1.0 05126f4
@richhickey richhickey move 1.0 to 1.0.1 alpha c045881
Commits on Aug 03, 2009
@cgrand cgrand fixes commute after set
Signed-off-by: Rich Hickey <richhickey@gmail.com>
833f9f3
Showing with 7 additions and 9 deletions.
  1. +2 −2 src/clj/clojure/version.properties
  2. +5 −7 src/jvm/clojure/lang/LockingTransaction.java
View
4 src/clj/clojure/version.properties
@@ -1,5 +1,5 @@
clojure.version.major=1
clojure.version.minor=0
-clojure.version.incremental=0
-clojure.version.qualifier=
+clojure.version.incremental=1
+clojure.version.qualifier=alpha
clojure.version.interim=true
View
12 src/jvm/clojure/lang/LockingTransaction.java
@@ -240,6 +240,8 @@ Object run(Callable fn) throws Exception{
for(Map.Entry<Ref, ArrayList<CFn>> e : commutes.entrySet())
{
Ref ref = e.getKey();
+ if(sets.contains(ref)) continue;
+
ref.lock.writeLock().lock();
locked.add(ref);
Info refinfo = ref.tinfo;
@@ -249,8 +251,7 @@ Object run(Callable fn) throws Exception{
throw retryex;
}
Object val = ref.tvals == null ? null : ref.tvals.val;
- if(!sets.contains(ref))
- vals.put(ref, val);
+ vals.put(ref, val);
for(CFn f : e.getValue())
{
vals.put(ref, f.fn.applyTo(RT.cons(vals.get(ref), f.args)));
@@ -258,11 +259,8 @@ Object run(Callable fn) throws Exception{
}
for(Ref ref : sets)
{
- if(!commutes.containsKey(ref))
- {
- ref.lock.writeLock().lock();
- locked.add(ref);
- }
+ ref.lock.writeLock().lock();
+ locked.add(ref);
}
//validate and enqueue notifications

No commit comments for this range

Something went wrong with that request. Please try again.