Clarify order behavior
This commit is contained in:
parent
53ae699acd
commit
5faa510117
1
main.go
1
main.go
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user