[imp-hackers] cl-ext:exit

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Jul 2 21:01:49 UTC 2009


On Thu, Jul 2, 2009 at 8:44 PM, Erik Huelsmann<ehuels at gmail.com> wrote:
> On Thu, Jul 2, 2009 at 5:26 PM, Juan Jose
> Garcia-Ripoll<juanjose.garciaripoll at googlemail.com> wrote:
>> ECL's EXT:*EXIT-HOOKS* does the same, [...]
>> What about then with accidental
>> thread local bindings? Or if a user cleans up the variable?
>
> How does special binding work in ECL? Special bindings in ABCL are
> thread-local, only (SETF SYMBOL-VALUE) isn't.

I do not understand what you say about ABCL. If you have declared a
variable as special and you do (setf (symbol-value
*my-special-variable) whatever) then you can not say a-priori whether
you are setting a locally established binding or the ultimate symbol
value in the global environment.

Apart from this, in ECL, when you start a thread you can specify that
SETF SYMBOL-VALUE is always thread local for a set of symbols: that is
when you climb up the chain of special variable bindings and and reach
the ultimate value slot, that will be only for that thread. It is like
surrounding the thread with a global binding for each of the variables
you specify.

But as I say, the problem is more general. If *EXIT-HOOK* or
*FINI-HOOKS* is bound (not globally setf'ed), the values of each
thread will not be honored. There are also thread synchronization
issues, for these special variables in current implementations are not
protected. Overall, the mechanism is weak.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the implementation-hackers mailing list