aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Code_Overview.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-11 20:22:39 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-12 22:53:43 -0500
commit1dee1ba64e52394446e8aa67a8418f066257a9a2 (patch)
treeede2123e397183bb68a7f25c907ee751d138c513 /docs/Code_Overview.md
parentafecf7ce36d4d712413d8c90ac055baa51cb26bd (diff)
downloadkutter-1dee1ba64e52394446e8aa67a8418f066257a9a2.tar.gz
kutter-1dee1ba64e52394446e8aa67a8418f066257a9a2.tar.xz
kutter-1dee1ba64e52394446e8aa67a8418f066257a9a2.zip
queuelogger: Add support for background log writing
Writing to the debug log can cause an unbounded delay due to disk IO. This is particularly so on embedded machines such as the Raspberry Pi that run on SD cards. These log writing delays can cause problems for the main processing threads. The new "queuelogger" code forwards all the main thread log messages to a queue, and a background thread writes the log messages from the queue to the destination file. This eliminates the IO delay from the main threads. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/Code_Overview.md')
-rw-r--r--docs/Code_Overview.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md
index 1522c60b..207b37f4 100644
--- a/docs/Code_Overview.md
+++ b/docs/Code_Overview.md
@@ -98,9 +98,11 @@ printer object calls, which frequently translate the actions to
commands to be executed on the micro-controller (as declared via the
DECL_COMMAND macro in the micro-controller code).
-There are three threads in the Klippy host code. The main thread
+There are four threads in the Klippy host code. The main thread
handles incoming gcode commands. A second thread (which resides
entirely in the **klippy/serialqueue.c** C code) handles low-level IO
with the serial port. The third thread is used to process response
messages from the micro-controller in the Python code (see
-**klippy/serialhdl.py**).
+**klippy/serialhdl.py**). The fourth thread writes debug messages to
+the log (see **klippy/queuelogger.py**) so that the other threads
+never block on log writes.