Add small comment about stop_event.

This commit is contained in:
voussoir 2021-01-14 02:36:12 -08:00
parent b0801508c8
commit 6666430ed8

View file

@ -194,6 +194,8 @@ def copy_dir(
stop_event: stop_event:
If provided, a threading.Event object which when set indicates that we 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. 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: validate_hash:
Passed directly into each `copy_file`. Passed directly into each `copy_file`.