From james.anderson at setf.de Sat Sep 4 09:23:56 2010 From: james.anderson at setf.de (james anderson) Date: Sat, 4 Sep 2010 11:23:56 +0200 Subject: [Bordeaux-threads-devel] *default-special-bindings* docstring in 0-8-8-dev Message-ID: <1206757C-73FE-4FE8-B230-ED90FF5EFBC7@setf.de> re: (defvar *default-special-bindings* nil "This variable holds an alist associating special variable symbols to forms to evaluate. Special variables named in this list will be locally bound in the new thread before it begins executing user code. This variable may be rebound around calls to MAKE-THREAD to add/alter default bindings. The effect of mutating this list is undefined, but earlier forms take precedence over later forms for the same symbol, so defaults may be overridden by consing to the head of the list.") at least for sbcl and clozure, one needs to append to the list. does the spec say something else somewhere? * (progv '(a s a) '(1 2 3) a) ; in: LAMBDA NIL ; (PROGV '(A S A) '(1 2 3) A) ; --> LET UNWIND-PROTECT FLET BLOCK MULTIPLE-VALUE-BIND MULTIPLE- VALUE-CALL ; --> BLOCK SB-C::%WITHIN-CLEANUP RETURN-FROM ; ==> ; (PROGN ; (LABELS ((#:UNBIND1 (SB-C::VARS) ; (DECLARE #) ; (LET # ; #)) ; (#:BIND0 (SB-C::VARS SB-C::VALS) ; (DECLARE #) ; (COND # # #))) ; (#:BIND0 '(A S A) '(1 2 3))) ; NIL ; A) ; ; caught WARNING: ; undefined variable: A ; ; compilation unit finished ; Undefined variable: ; A ; caught 1 WARNING condition 3 * From gugamilare at gmail.com Sat Sep 4 13:57:35 2010 From: gugamilare at gmail.com (Gustavo) Date: Sat, 4 Sep 2010 10:57:35 -0300 Subject: [Bordeaux-threads-devel] *default-special-bindings* docstring in 0-8-8-dev In-Reply-To: <1206757C-73FE-4FE8-B230-ED90FF5EFBC7@setf.de> References: <1206757C-73FE-4FE8-B230-ED90FF5EFBC7@setf.de> Message-ID: (Sorry, I had forgotten to CC). Hello, James, I'm not a bordeaux-threads maintainer, but I can answer your question. Duplicates are explicitly removed from the list *default-special-bindings* before passing it's value to progv. Take a look the function bt::binding-default-specials. Gustavo. 2010/9/4 james anderson > re: > > (defvar *default-special-bindings* nil > "This variable holds an alist associating special variable symbols > to forms to evaluate. Special variables named in this list will > be locally bound in the new thread before it begins executing user > code. > > This variable may be rebound around calls to MAKE-THREAD to > add/alter default bindings. The effect of mutating this list is > undefined, but earlier forms take precedence over later forms for > the same symbol, so defaults may be overridden by consing to the > head of the list.") > > at least for sbcl and clozure, one needs to append to the list. > does the spec say something else somewhere? > > > * (progv '(a s a) '(1 2 3) a) > > ; in: LAMBDA NIL > ; (PROGV '(A S A) '(1 2 3) A) > ; --> LET UNWIND-PROTECT FLET BLOCK MULTIPLE-VALUE-BIND MULTIPLE- > VALUE-CALL > ; --> BLOCK SB-C::%WITHIN-CLEANUP RETURN-FROM > ; ==> > ; (PROGN > ; (LABELS ((#:UNBIND1 (SB-C::VARS) > ; (DECLARE #) > ; (LET # > ; #)) > ; (#:BIND0 (SB-C::VARS SB-C::VALS) > ; (DECLARE #) > ; (COND # # #))) > ; (#:BIND0 '(A S A) '(1 2 3))) > ; NIL > ; A) > ; > ; caught WARNING: > ; undefined variable: A > ; > ; compilation unit finished > ; Undefined variable: > ; A > ; caught 1 WARNING condition > > 3 > * > > > _______________________________________________ > Bordeaux-threads-devel mailing list > Bordeaux-threads-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bordeaux-threads-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: