[closer-devel] layer slots

Attila Lendvai attila.lendvai at gmail.com
Mon Nov 26 17:30:41 UTC 2007


hi,

while working on a new architecture for verrazano where backends are
layers, i wanted to add slots for layers.

after looking at the contextl code i ended up with two questions:
 - there's no public api to get the prototype from the layer-context
on which i could access the slots i've added to my layer
 - the prototype in the active layer-context is not instantiated with
make-instance but the class-prototype is used which means that layer
slots are effectively shared among threads (and maybe even after a
nested deactivation/activation of the layer?)

the test files suggest usage like this:

(assert (eq (slot0 (find-layer 'test-layer)) 'foo))

but find-layer also simply calls class-prototype after a find-class on
the layer name, which again is a shared instance. or am i badly
missing here something?

maybe it's ok to call class-prototype because there'll always be a
distinct class? if so, how does it interact with caching?

did i make some sense?

-- 
 attila



More information about the closer-devel mailing list