remove garbage collection entirely

This commit is contained in:
jkhsjdhjs 2023-07-16 22:47:04 +00:00
parent a44082180c
commit 125528c567

24
bert.py
View File

@ -1,6 +1,5 @@
#!/usr/bin/python3 -u
import gc
import socket
import ssl
import sys
@ -503,17 +502,6 @@ def fefe_check():
sleep(300)
def gc_cycle():
while True:
try:
# fire the garbage collector
gc.set_debug(gc.DEBUG_STATS)
gc.collect()
sleep(120)
except Exception as err:
print("Error in garbage collector! - "+str(err))
class command_thread(threading.Thread):
def __init__(self, threadID):
threading.Thread.__init__(self)
@ -530,26 +518,14 @@ class fefe_thread(threading.Thread):
print("Starting fefe thread...")
fefe_check()
class gc_thread(threading.Thread):
def __init__(self, threadID):
threading.Thread.__init__(self)
self.threadID = threadID
def run(self):
print("Starting garbage collector thread...")
gc_cycle()
def main():
start(host, port, nick, password, set(join_chans + fefe_chans))
thread_command = command_thread(1)
#thread_fefe = fefe_thread(2)
#thread_gc = gc_thread(3)
thread_command.start()
#sleep(2)
#thread_fefe.start()
#sleep(2)
#thread_gc.start()
if __name__ == "__main__":
#gc.enable()
main()