def test_cycle (): "test a finalizations' cycle collection" one = Watch ('one') two = Watch ('two') three = Watch ('three') four = Watch ('four') finalization.continuation ([one, two, three, four]) four.cycle = three del one, two, three, four async_loop.dispatch () gc.collect () loginfo.log ('garbage: %r' % gc.garbage) for cycled in gc.garbage: cycled.finalization = None async_loop.dispatch ()
def test_cycle(): "test a finalizations' cycle collection" one = Watch('one') two = Watch('two') three = Watch('three') four = Watch('four') finalization.continuation([one, two, three, four]) four.cycle = three del one, two, three, four async_loop.dispatch() gc.collect() loginfo.log('garbage: %r' % gc.garbage) for cycled in gc.garbage: cycled.finalization = None async_loop.dispatch()
def __init__ (self, finalizations): self.__call__, self.continued = finalization.continuation ( finalizations )
def __init__(self, finalizations): self.__call__, self.continued = finalization.continuation( finalizations)