New API to suspend a loop

This commit is contained in:
Kovid Goyal
2023-02-14 22:27:41 +05:30
parent 9aaca33f15
commit 67436a48cd
3 changed files with 41 additions and 7 deletions

View File

@@ -58,7 +58,8 @@ type Loop struct {
pending_writes []*write_msg
on_SIGTSTP func() error
// Send strings to this channel to queue writes in a thread safe way
// Suspend the loop restoring terminal state. Call the return resume function to restore the loop
Suspend func() (func() error, error)
// Callbacks