Added a note about standard streams while an application is running. Resolves #1017

This commit is contained in:
Oliver 2024-08-18 13:03:01 +02:00
parent e4c497cc59
commit fd649dbf12
1 changed files with 7 additions and 1 deletions

View File

@ -250,7 +250,13 @@ func (a *Application) EnablePaste(enable bool) *Application {
}
// Run starts the application and thus the event loop. This function returns
// when Stop() was called.
// when [Application.Stop] was called.
//
// Note that while an application is running, it fully claims stdin, stdout, and
// stderr. If you use these standard streams, they may not work as expected.
// Consider stopping the application first or suspending it (using
// [Application.Suspend]) if you have to interact with the standard streams, for
// example when needing to print a call stack during a panic.
func (a *Application) Run() error {
var (
err, appErr error