mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Loop API print proper stack traces for panics in go routines
This commit is contained in:
@@ -394,6 +394,7 @@ func (self *Loop) run() (err error) {
|
||||
self.write_msg_id_counter = 0
|
||||
write_done_channel := make(chan IdType)
|
||||
self.wakeup_channel = make(chan byte, 256)
|
||||
self.panic_channel = make(chan any)
|
||||
self.pending_writes = make([]write_msg, 0, 256)
|
||||
err_channel := make(chan error, 8)
|
||||
self.death_signal = SIGNULL
|
||||
@@ -563,6 +564,8 @@ func (self *Loop) run() (err error) {
|
||||
}
|
||||
select {
|
||||
case <-timeout_chan:
|
||||
case p := <-self.panic_channel:
|
||||
panic(p)
|
||||
case <-self.wakeup_channel:
|
||||
for len(self.wakeup_channel) > 0 {
|
||||
<-self.wakeup_channel
|
||||
|
||||
Reference in New Issue
Block a user