1
1
12rbah2021-01-20 17:33:26
go
12rbah, 2021-01-20 17:33:26

What does goroutine 996 [sleep]: error mean?

I run 5 goroutines, but under certain conditions, the application crashes with about such errors, from the features it crashes when I quickly run them several times in a row, I think that the problem is due to the fact that I kill them incorrectly, but I'm not sure.

spoiler

goroutine 808 [sleep]:
time.Sleep(0x989680)
/snap/go/current/src/runtime/time.go:188 +0xbf

...

goroutine 1314 [sleep]:
time.Sleep(0x989680)
/snap/go/current/src/runtime/time.go:188 +0xbf
...

goroutine 1004 [sleep]:
time.Sleep(0x989680)



//ссылки указывают на эту
func skipF(C *Component,skip chan bool){
  for {
    time.Sleep(time.Millisecond*10)
    if C.SkipItem == true{
      C.SkipItem = false
      skip <- false
      return
    }
  }
}

//и эту горутину
func cancelF(C *appStruct.GuiComponent,cancel chan bool){
  for {
    time.Sleep(time.Millisecond*10)
    if C.IsActive == false{
      cancel <- false
      return
    }
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Tsvetkov, 2021-01-21
@12rbah

This is not an error, this is a stack trace of all goroutines. Sleep means that a particular goroutine was "sleeping", waiting for a read or write

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question