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

R. Kent Dybvig dyb at cs.indiana.edu
Sat Feb 10 16:11:54 EST 2007


> OK, thanks.  Now, this is different from SRFI 39, where a parameter is
> bound to a single storage cell.  Presumably, the spec could be twisted
> to allow thread creation to create new storage cells, but I believe
> this was specifically not the intent of SRFI 39.

Okay, we've gone from hideous to twisted.  But no twisting is necessary,
since make-parameter in Chez Scheme still creates one location. 
make-thread-parameter is the version that creates per-thread locations. 
Even having make-parameter itself use per-thread locations is an
upward-compatible extension when one adds threads.

> Anyway, the behavior of Chez's thread parameters isn't covered by what
> I meant as "hideous".  However, even Chez's thread parameters (which
> behave the same as PLT Scheme's parameters, I believe) are problematic
> when threads and continuations interact.  Things are simpler when
> dynamic binding and (possibly thread-local) mutation are separate
> mechanisms.

Now we're down to problematic, but I don't believe even that is true.  It
certainly hasn't been problematic with either Chez Scheme's native threads
or SWL's continuation-based threads.  Furthermore, the mechanisms *are*
separate---make-parameter and make-thread-parameter create parameters and
parameterize performs dynamic binding.  So I don't even see the basis for
your claim.

Kent



More information about the r6rs-discuss mailing list