*"A: Yes, except for one thing. That one thing is a behavior you are almost surely not depending on, but may have cursed excessively at in the past: closing a channel twice in Go causes a panic. Closing a channel in Pont never panics, no matter how many times you close it."*
I love it and never understood why in Go closing a channel more than once causes a panic. Can someone explain why is that? niedziela, 2 listopada 2025 o 23:42:50 UTC+1 Will Faught napisał(a): > Looks interesting! Is there an article somewhere that explains why each > change to Go was necessary for DST? For example, why are sticky channel > values required for DST? Couldn’t sticky values be simulated with a > goroutine that owns sending on a channel that implements the > sticky/unsticky/clear behavior? Isn’t it possible in general to arrange to > not close a channel more than once? > > On Oct 30, 2025, at 12:48 AM, Jason E. Aten <[email protected]> wrote: > > If you ever wished for > > + better Deterministic Simulation Testing (DST) support, or > > + that channels could replace Condition Variables, or for > > + a sync.WaitGroup alternative that could be interrupted by a timeout, or > that > > + channel close could be idempotent and broadcast a non-zero value, > > then I invite you to experiment with my superset-of-Go experiment, Pont. > > https://github.com/glycerine/pont > > Feedback welcome -- post an issue on the repo. > > Jason > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/c7dc4d42-0f31-4960-9497-a7855827b444n%40googlegroups.com > > <https://groups.google.com/d/msgid/golang-nuts/c7dc4d42-0f31-4960-9497-a7855827b444n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/7284d358-4fda-43d0-9a29-89e72f6f97d9n%40googlegroups.com.
