;;;; synch-params.scm ;;;; Kon Lovett, Dec '18 (module synch-params (;export current-synch-exit-condition current-synch-raise synch-raise-warning current-synch-abandon?) (import scheme (chicken base) (chicken condition)) ;;; Parameters (define (synch-raise-warning x) (warning 'synch-raise x) #;(warning 'synch-raise (if (condition? x) (condition->list x) x))) (define (check-synch-raise x) (if (procedure? x) x (error 'current-synch-raise "bad argument type - not a procedure" x) ) ) (define current-synch-raise (make-parameter synch-raise-warning check-synch-raise)) (define current-synch-abandon? (make-parameter #f)) (define current-synch-exit-condition (make-parameter 'synch-exit)) ) ;module synch-params