Socket
Book a DemoInstallSign in
Socket

github.com/seeadoog/infchan

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/seeadoog/infchan

Source
Go
Version
v0.0.0-20240128033314-dbfda1d36b88
Version published
Created
Source

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
    }
}

FAQs

Package last updated on 28 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts