Changeset 36998 in project


Ignore:
Timestamp:
12/14/18 18:25:53 (5 weeks ago)
Author:
kon
Message:

loose has csc vs csi sit

Location:
release/5/synch/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/synch/trunk/format-synch.scm

    r36978 r36998  
    99(import scheme
    1010  (rename format (format egg-format))
    11   (only synch-closed-tight synchronized-procedure))
     11  (only synch-wrapped synchronized-procedure))
    1212
    1313(define format (synchronized-procedure egg-format))
  • release/5/synch/trunk/tests/synch-loose-test.scm

    r36993 r36998  
    2525(define mx1 (make-mutex 'mx1))
    2626
    27 #;
    28 (let ((exit-k (call/cc (lambda (k) k))) )
    29   (define-thread mx1-exn-th
    30     (synch mx1
    31       (when exit-k
    32         (test-assert "exit k" exit-k)
    33         (exit-k #f))))
    34   (thread-start! mx1-exn-th)
    35 )
    3627(thread-start!
    3728  (lambda ()
     
    3930      (synch mx1
    4031        (ret 'ca))))))
    41 ;(test-assert "not unlocked" (thread? (mutex-state mx1)))
    42 (test "unlocked" 'not-abandoned (mutex-state mx1))
    4332
    44 (test-assert "reuse mutex" (synch mx1 #t))
     33(cond-expand
     34  (compiling
     35    (test "compiled is unlocked" 'not-abandoned (mutex-state mx1)) )
     36  (else
     37    (test "eval'ed is locked" 'abandoned (mutex-state mx1)) ) )
     38
     39(cond-expand
     40  (compiling
     41    (test-assert "compiled can reuse mutex" (synch mx1 #t)) )
     42  (else
     43    (test-error "eval'ed cannot reuse mutex" (synch mx1 #t)) ) )
    4544
    4645(test-end "synch exit")
Note: See TracChangeset for help on using the changeset viewer.