source: project/release/5/synch/trunk/synch-params.scm @ 38608

Last change on this file since 38608 was 38608, checked in by Kon Lovett, 3 months ago

add make-exchanger (in only module w/ disable-interrupts), strict-types, style, use symbol-append

File size: 1.1 KB
Line 
1;;;; synch-params.scm
2;;;; Kon Lovett, Dec '18
3
4;; Issues
5;;
6;; - syntax checking is minimal so expansion errors are cryptic
7;;
8;; - dynamic-wind, ...
9
10(module synch-params
11
12(;export
13  current-synch-exit-condition
14  current-synch-raise synch-raise-warning
15  current-synch-abandon?)
16
17
18(import scheme)
19(import (chicken base))
20(import (chicken condition))
21
22;;; Parameters
23
24(define (synch-raise-warning x)
25  (warning 'synch-raise x)
26  #;(warning 'synch-raise (if (condition? x) (condition->list x) x)))
27
28(define (warn-synch-raise x)
29  (if (procedure? x) x
30    (begin
31      (warning 'current-synch-raise "bad argument type - not a procedure" x)
32      (current-synch-raise) ) ) )
33
34(define (warn-synch-abandon? x)
35  (if (boolean? x) x
36    (begin
37      (warning 'current-synch-abandon? "bad argument type - not a boolean" x)
38      (current-synch-abandon?) ) ) )
39
40(define current-synch-raise           (make-parameter synch-raise-warning warn-synch-raise))
41(define current-synch-abandon?        (make-parameter #f warn-synch-abandon?))
42(define current-synch-exit-condition  (make-parameter 'synch-exit))
43
44) ;module synch-params
Note: See TracBrowser for help on using the repository browser.