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

From: R. Kent Dybvig <dyb>
Date: Sat Feb 10 12:12:56 2007

> Could you explain what the difference between global and thread
> parameters is in Chez Scheme? I can't find an explanation in the
> online user's manual.

>From Section 13.4:

  When a thread parameter is created, a separate location is set aside in
  each current and future thread to hold the value of the parameter's
  internal state variable. (This location may be eliminated by the
  storage manager when the parameter becomes inaccessible.) Changes to the
  thread parameter in one thread are not seen by any other thread.

  When a new thread is created (see fork-thread), the current value (not
  location) of each thread parameter is inherited from the forking thread
  by the new thread.

So when a thread parameterizes a thread parameter, it's parameterizing
it's own. It usually makes no sense for one of multiple threads to
parameterize a global parameter.

Kent
Received on Sat Feb 10 2007 - 12:12:50 UTC

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