diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-09-16 22:23:44 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-09-16 23:53:45 -0400 |
commit | cb0a8f2ed9d5895e7b07a3783f00205f33e23203 (patch) | |
tree | af862fe9e2ad6d87f29ca00366532640a4cd8a80 /klippy/klippy.py | |
parent | 73cd8c241cb57a1f858b5f2f31e737ab339b8301 (diff) | |
download | kutter-cb0a8f2ed9d5895e7b07a3783f00205f33e23203.tar.gz kutter-cb0a8f2ed9d5895e7b07a3783f00205f33e23203.tar.xz kutter-cb0a8f2ed9d5895e7b07a3783f00205f33e23203.zip |
reactor: Add support for explicit Python garbage collection
Add support for performing Python gc work only from the main reactor
thread and only when it appears the main thread is idle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index 03095d06..325d6fa3 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -306,6 +306,7 @@ def main(): elif not options.debugoutput: logging.warning("No log file specified!" " Severe timing issues may result!") + gc.disable() # Start Printer() class while 1: @@ -313,7 +314,7 @@ def main(): bglogger.clear_rollover_info() bglogger.set_rollover_info('versions', versions) gc.collect() - main_reactor = reactor.Reactor() + main_reactor = reactor.Reactor(gc_checking=True) printer = Printer(main_reactor, bglogger, start_args) res = printer.run() if res in ['exit', 'error_exit']: |