Add small comment about stop_event.
This commit is contained in:
parent
b0801508c8
commit
6666430ed8
1 changed files with 2 additions and 0 deletions
|
@ -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`.
|
||||||
|
|
Loading…
Reference in a new issue