Examples broken with SBCL version >= 2.2.3
joshcho opened this issue · comments
Josh Cho commented
I have tested on 2.2.3, 2.2.4, 2.2.6, and 2.2.9, and they all give the same error message:
Recursive lock attempt #<SB-THREAD:MUTEX taken owner=worker {1016D70D03}>.
when running
(with-transaction ()
(let ((c1 (make-customer :first-name "Joe" :last-name "Blow" :email "joe@blow.com"))
(c2 (make-customer :first-name "Jill" :last-name "Blow" :email "jill@blow.com"))
(m1 (make-merchant :name "Snake Oil, Inc."))
(p1 (make-product :name "Oil of Longevity" :upc "1234567890"))
(p2 (make-product :name "Oil of Slipperiness" :upc "abcdefghijk")))
(make-sells :from m1 :to p1)
;; The above is equivalent to
;; (make-edge 'sells m1 p1 1 nil)
(make-sells :from m1 :to p2)
(make-likes :from c1 :to p1 :weight 100.0)
(make-likes :from c1 :to p2 :weight 20.0)
(make-likes :from c2 :to p2 :weight 50.0)))
2.2.1 and 2.2.2 are fine.
rainthree commented
To fix, replace
sb-thread:*current-thread*
with
(sb-thread::current-vmthread-id)
here:
https://github.com/kraison/vivace-graph-v3/blob/master/skip-list.lisp#L375