vivace-graph-v3 icon indicating copy to clipboard operation
vivace-graph-v3 copied to clipboard

Examples broken with SBCL version >= 2.2.3

Open joshcho opened this issue 3 years ago • 5 comments

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 "[email protected]"))
        (c2 (make-customer :first-name "Jill" :last-name "Blow" :email "[email protected]"))
        (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.

joshcho avatar Nov 25 '22 01:11 joshcho

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

rainthree avatar Feb 21 '23 15:02 rainthree