For the reference: https://godoc.org/lab.nexedi.com/kirr/neo/go/zodb/internal/weak and rationale: https://lab.nexedi.com/kirr/neo/blob/cb94be39/go/zodb/connection.go#L73-121
Kirill вторник, 5 марта 2013 г., 3:49:02 UTC+4 пользователь Dustin написал: > > > I've been looking around for some information on weak references and, > while I've found a few open threads, I haven't seen much of a closure on > this, nor an issue opened on the project. > > I'd like to have a weak reference. It seems like this requires GC > cooperation, though I'm open to a supportable strategy that doesn't > require any core changes. > > A friendly irc user suggested something like this could theoretically > work: http://play.golang.org/p/IHRU2TwgF9 > > But in general, being able to build a map[thing]WeakReference would be > very useful for many caching scenarios. WeakReference.Get() -> > interface{} would be fine. Something typesafe would be even better. > > Is there a writeup about this? Should I file an issue? > > -- > dustin > > > -- 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/79ec4b33-3130-4976-b0a7-7aea1d81b841%40googlegroups.com.