Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Needed to lock around the printer and dimensions function

  • Loading branch information...
commit 3cccc6095c634ee2e5db496e0cbc0c9c8cdb7b26 1 parent be5e01a
authored June 14, 2011

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. 12  versioned-arrays.lisp
12  versioned-arrays.lisp
@@ -73,13 +73,15 @@
73 73
 ;; Some niceties...
74 74
 
75 75
 (defun va-dimensions (v-arr)
76  
-  (if (arrayp (versioned-array-car v-arr))
77  
-      (array-dimensions (versioned-array-car v-arr))
78  
-      (va-dimensions (versioned-array-cdr v-arr)) ))
  76
+  (bt:with-recursive-lock-held ((versioned-array-lock v-arr))
  77
+    (if (arrayp (versioned-array-car v-arr))
  78
+        (array-dimensions (versioned-array-car v-arr))
  79
+        (va-dimensions (versioned-array-cdr v-arr)) )))
79 80
 
80 81
 (defun va-dimension (v-arr n)
81 82
   (nth n (va-dimensions v-arr)) )
82 83
 
83 84
 (defmethod print-object ((obj versioned-array) str)
84  
-   (varef obj 0 0)
85  
-   (print (versioned-array-car obj) str) )
  85
+  (bt:with-recursive-lock-held ((versioned-array-lock v-arr))
  86
+    (varef obj 0 0)
  87
+    (print (versioned-array-car obj) str) ))

0 notes on commit 3cccc60

Please sign in to comment.
Something went wrong with that request. Please try again.