package
0.0.0-20240819164739-f47aed85de5a
Repository: https://github.com/unix-world/smartgo.git
Documentation: pkg.go.dev

# README

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.

# Functions

Make new channel.

# Interfaces

C is a channel.