All Projects → tidwall → Chanx

tidwall / Chanx

Licence: mit
A simple interface wrapper around a Go channel.

Programming Languages

go
31211 projects - #10 most used programming language

chanx

GoDoc

A simple interface wrapper around a Go channel.

// Make new channel. Provide a length to make a buffered channel.
func Make(length int) C

type C interface {
	// Send a messge to the channel. Returns false if the channel is closed.
	Send(v interface{}) (ok bool)
	// Recv a messge from the channel. Returns false if the channel is closed.
	Recv() (v interface{}, ok bool)
	// Close the channel. Returns false if the channel is already closed.
	Close() (ok bool)
	// Wait for the channel to close. Returns immediately if the channel is
	// already closed
	Wait()
}

Contact

Josh Baker @tidwall

License

chanx source code is available under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].