FAQ
Hello gophers,

I'd like to see issue 4720 fixed. I've looked around in the archives and on
codereview to see if there is work underway, but I don't see anything
recent. (I see Dmitry's sync.Cache, but it seems like a different thing?)

Would a proposed API that implements
https://code.google.com/p/go/issues/detail?id=4720#c9 be welcome?

A question for Russ, if we start working on this... You specified that it
should be a cache of fixed sized objects. But should it be dealing in
interface{}? Or should sync.Cache deal in []byte only? In that case, users
who want to deal in other object types will be obliged to use unsafe to
cast the received pointer to their desired object type. That's pretty
gross, but perhaps it is the right tradeoff, because we generally want to
dissuade all but the most savvy users from thinking about memory management
in these terms.

Finally, there was more than one vote that it should be called sync.Pool. I
also prefer the name pool.

-jeff

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Russ Cox at Mar 1, 2013 at 1:33 pm
    Thanks for the offer but I don't think we know what this should look like
    yet. If done as intended (without locks, with M- or P-affinity) it will
    require changes to the runtime, and the runtime is quite in flux. So I
    think it is probably best to wait a bit. sync.Cache may not make it into Go
    1.1, and that's okay.

    Russ

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jeff R. Allen at Mar 1, 2013 at 2:52 pm
    Ah, got it. I missed that it would be with runtime changes. I was expecting
    to make a public version of what's in fmt.

    Thanks for the clarification.
    -jeff

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedMar 1, '13 at 12:00p
activeMar 1, '13 at 2:52p
posts3
users2
websitegolang.org

2 users in discussion

Jeff R. Allen: 2 posts Russ Cox: 1 post

People

Translate

site design / logo © 2022 Grokbase