I have identified a bottleneck in my program, it is a buffered channel. I would like to give client an indication of system load, which should be indicated by number of messages buffered in the channel.
Is there a way in Go to tell how many buffered messages there are in a channel?
If you also have a Java background, I am looking for an equivelent of this: http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html#size()