From ... From: Erik Naggum Subject: Re: Dynamic bindings and lightweight processes Date: 2000/03/03 Message-ID: <3161081138993119@naggum.no>#1/1 X-Deja-AN: 592685694 References: mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 952094476 23977 195.0.192.66 (3 Mar 2000 14:41:16 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 3 Mar 2000 14:41:16 GMT Newsgroups: comp.lang.lisp * Tim Bradshaw | I think the wrongness is to assume that SYMBOL-VALUE gets at the `slot in | the symbol', which is something I used to think. In fact it gets at the | current dynamic binding -- there is no portable way to get at the slot in | the symbol -- and indeed there may *be* no distinct symbol slot, but just | a top-level binding. if the current dynamic value of a special variable and symbol-value of the symbol _differ_ (modify one, don't see the difference in the other), you have a seriously non-conforming implementation, so _the_ portable way to get at the slot in the symbol cannot be any different than the current dynamic value. please don't confuse this issue beyond necessity. there are two ways to do this dynamic binding thing: shallow and deep binding. shallow binding stuffs the old value away, typically on the same stack that unwind-protect uses, and stores the new value in the symbol-value slot. deep binding basically pushes symbols on an alist (or something very similar) and traverses it to get the current value. in a multiprocessing setting, there are multiple stacks, and at least one of them is used to store the process-local value of symbol-value slots of process-bound special variables. this is actuall fairly well documented in each of the Common Lisp systems that support multiprocessing. #:Erik