Exemplo n.º 1
0
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 ()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
 def __init__ (self, finalizations):
         self.__call__, self.continued = finalization.continuation (
                 finalizations
                 )
Exemplo n.º 4
0
 def __init__(self, finalizations):
     self.__call__, self.continued = finalization.continuation(
         finalizations)