On Fri, Sep 30, 2022 at 11:47 PM 'Axel Wagner' via golang-nuts <golang-nuts@googlegroups.com> wrote: > > Note that TLS (or GLS) and similar primitives *are* periodically talked about > and I don't think it is categorically excluded to at least get primitives > which address *some* of the uses. sync.Pool is one such example. However, Go > tries to be careful about it and instead of adding general TLS, which can be > used for things it would consider good *and* bad, rather talks about each > individual use case built on top of it separately and tries to forge them > into APIs which allow for the good and prevent the bad. A context.Context in > TLS has so far been rejected because it seems the bad outweighs the good.
Another example of goroutine-local storage that we currently support is runtime/pprof.Do, which adds labels to the current goroutine. This seems OK as the labels are readonly and are inherited by goroutines started with a go statement. The labels are recorded in profiles. Ian -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWgrWvbjTehvWCXxQQ%2BV8rXjsvk1dyB7JvADBy%2BhP8qEw%40mail.gmail.com.