Clarify order behavior

This commit is contained in:
IamTheFij 2025-02-13 23:37:29 -08:00
parent 53ae699acd
commit 5faa510117

View File

@ -90,6 +90,7 @@ func (sr *ShellRunner) Start() {
// No commands can be added if the runner has been stopped or not yet started.
// The callback is executed asynchronously after the command has completed.
// The order of command execution and callback invocation can be expected to be preserved (maybe?).
// They are atarted in order, but may not finish or execute their callbacks in the same order
func (sr *ShellRunner) AddCommand(command string, callback func(*CommandResult)) error {
cmd, cancel := sr.newShellCommand(command)
return sr.AddCmd(cmd, callback, cancel)