You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know. The behavior of "reflect.Select" called with an empty slice is not documented anywhere as I can judge.
I would prefer the call to return an error. But I don't know what is the intended behavior. Maybe the developers consider "hanging forever" behavior the right option.
Please consider changing or documenting the behavior of "reflect.Select" called with an empty slice.
What did you see instead?
The following message:
fatal error: all goroutines are asleep - deadlock!
The text was updated successfully, but these errors were encountered:
The intent is that reflect.Select act like the select statement. I think that is what it does, and it is documented that way. Closing because I don't think there is anything to do.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.9.1
Does this issue reproduce with the latest release?
Don't know
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH="amd64"
GOHOSTOS="linux"
What did you do?
active_index, rcv_value, ok := reflect.Select(make([]reflect.SelectCase, 0))
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
package main
import "reflect"
import "fmt"
func main() {
active_index, rcv_value, ok := reflect.Select(make([]reflect.SelectCase, 0))
fmt.Println(active_index, rcv_value, ok)
}
What did you expect to see?
I don't know. The behavior of "reflect.Select" called with an empty slice is not documented anywhere as I can judge.
I would prefer the call to return an error. But I don't know what is the intended behavior. Maybe the developers consider "hanging forever" behavior the right option.
Please consider changing or documenting the behavior of "reflect.Select" called with an empty slice.
What did you see instead?
The following message:
fatal error: all goroutines are asleep - deadlock!
The text was updated successfully, but these errors were encountered: