Add a callback for wakeups

This commit is contained in:
Kovid Goyal
2022-11-15 18:01:21 +05:30
parent 234274c1df
commit 87108a18ef
2 changed files with 9 additions and 0 deletions

View File

@@ -78,6 +78,9 @@ type Loop struct {
// Called when resuming from a SIGTSTP or Ctrl-z
OnResumeFromStop func() error
// Called when main loop is woken up
OnWakeup func() error
}
func New(options ...func(self *Loop)) (*Loop, error) {