Is there a way to see how much memory is left in my asynchronous channel in Go?
for instance
a chan uint=make(chan bool, 5) a<-true fmt.Printf(a.capazity())
For instance,
package main import "fmt" func main() { a := make(chan bool, 5) a <- true fmt.Println(cap(a) - len(a)) }
Output:
4
Source: https://habr.com/ru/post/1488494/More articles:How to make display a semicolon with input type number? - html5Unable to trigger click event on link - javascriptSharedpreferences do not work, defaults are javaOrder Asc in a column of numbers - sqlAndroid Google map Null pointer exception when adding marker - javaR applies the function to the rows of the data frame, using the values as arguments - rChanging the width of a button in jquery - jqueryShould I use the return keyword when rendering the view? - node.jsglibc detected: double freedom or corruption - c ++Emacs lisp: type "Falling" for defcustom. - emacsAll Articles