[r6rs-discuss] [Formal] SRFI-39 should be made an R6RS library

Michael Sperber sperber at informatik.uni-tuebingen.de
Wed Feb 21 12:46:18 EST 2007


"R. Kent Dybvig" <dyb at cs.indiana.edu> writes:

> This allows different threads to assign different default values to its
> parameters, with only those that are parameterized by a continuation
> overriding those defaults.  For example, I might want each thread to
> redirect its diagnostic output to a different port by setting the
> current-output-port parameter while letting a continuation determine the
> values of other parameters via parameterize.

So, in effect, parameters give you thread-local cells, right?

(define (make-thread-cell v) (make-parameter v))
(define (thread-cell-ref c) (c))
(define (thread-cell-set! c v) (c v))

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the r6rs-discuss mailing list