Permalink
Browse files

Needed to lock around the printer and dimensions function

  • Loading branch information...
1 parent be5e01a commit 3cccc6095c634ee2e5db496e0cbc0c9c8cdb7b26 @smithzvk committed Jun 14, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 versioned-arrays.lisp
View
@@ -73,13 +73,15 @@
;; Some niceties...
(defun va-dimensions (v-arr)
- (if (arrayp (versioned-array-car v-arr))
- (array-dimensions (versioned-array-car v-arr))
- (va-dimensions (versioned-array-cdr v-arr)) ))
+ (bt:with-recursive-lock-held ((versioned-array-lock v-arr))
+ (if (arrayp (versioned-array-car v-arr))
+ (array-dimensions (versioned-array-car v-arr))
+ (va-dimensions (versioned-array-cdr v-arr)) )))
(defun va-dimension (v-arr n)
(nth n (va-dimensions v-arr)) )
(defmethod print-object ((obj versioned-array) str)
- (varef obj 0 0)
- (print (versioned-array-car obj) str) )
+ (bt:with-recursive-lock-held ((versioned-array-lock v-arr))
+ (varef obj 0 0)
+ (print (versioned-array-car obj) str) ))

0 comments on commit 3cccc60

Please sign in to comment.