[PEAK] Re: trellis.Set.discard

Phillip J. Eby pje at telecommunity.com
Sat Nov 1 00:58:12 EDT 2008


At 05:27 AM 11/1/2008 +0200, Sergey Schetinin wrote:
>Sorry to bother you if this was answered already, but that will only
>fix the readonly issue, right?
>
>This one:
>
>class C(Component):
>     x = attr()
>     @maintain
>     def rule(self):
>         self.x = 10
>
>@atomically
>def test():
>     C().x = 1
>
>and the new discrete rules not resetting immediately after init are
>still outstanding, correct?

Correct.


>Any decision on those?

I suppose it might work to have new cells' _finish() methods called 
at the end of a component creation "transaction".  That would fix 
both problems, I think.  (Though I'm not sure it would work correctly 
for new discretes with active readers, as a changed() call occurs in 
that case, and would result in some of the newly scheduled cells 
being recalculated.)

I'll need to think about it some more when I go back to working on this.




More information about the PEAK mailing list