From 6666430ed8b246c87884c32e6b144b663cf61863 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 14 Jan 2021 02:36:12 -0800 Subject: [PATCH] Add small comment about stop_event. --- voussoirkit/spinal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index 71ff148..d9f0ed3 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -194,6 +194,8 @@ def copy_dir( stop_event: If provided, a threading.Event object which when set indicates that we should finish the current file and then stop the remainder of the copy. + For example, you can run this function in a thread and let the main + thread catch ctrl+c to set the stop_event, so the copy can stop cleanly. validate_hash: Passed directly into each `copy_file`.