I'm trying to define a Reference Counted Channel struct, like below:

type RefCountedChannel {
    Channel chan Type
    RefCount int
    mux sync.Mutex
}

I have to define different struts to hold different channel types.
But I don't care the type of Channel, I just close is when RefCount become 
0.
May I use a single Channel to hold all types of channels?

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to