Python: gc.get_threshold() - Python Glossary

Publicado em: 11 Março 2015
no canal de: Code master
525
5

gc.get_threshold(threshold0, threshold1, threshold2)

You will see three numbers returned to us and these numbers are set at three different runs of the garbage collection. First one is ran when the allocations minus the deallocations exceed the number displayed.Default for threshold0 is 700. If the object survives the first run it is relocated into the second run. The second number returned to us is when the second garbage collection will run this is threshold1 of garbage collection this number is based on the number runs that threshold0 does. The succeeding generation default is 10 so in this case threshold0 run must run ten times before the threshold1 of garbage collection is ran. If an object survives the subsequent run it is now moved into the third and final run and the object will stay here until it is removed. Threshold2 will run based off threshold1 runs. The default is 10 threshold1 runs. So, when the threshold1 runs ten times the final generation will run.


Nesta página do site você pode assistir ao vídeo on-line Python: gc.get_threshold() - Python Glossary duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Code master 11 Março 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 525 vezes e gostou 5 espectadores. Boa visualização!