An open API service indexing awesome lists of open source software.

https://github.com/seeadoog/infchan

go chan with infinity capacity , never block on sending
https://github.com/seeadoog/infchan

Last synced: 3 months ago
JSON representation

go chan with infinity capacity , never block on sending

Awesome Lists containing this project

README

        

## InfChan
InfChan is a go chan with infinity capacity. Put elem to Chan will never block.

### example
````

c := NewChan[int](1)

for i := 0; i < 10; i++ {
c.Put(i)
}
c.Close()
for {

data, ok := <-c.Get()
fmt.Println(data, ok)
if !ok {
break
}
}

````