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

From: Michael Sperber <sperber>
Date: Wed Feb 21 12:46:20 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
Received on Wed Feb 21 2007 - 12:46:18 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC