Skip to content

tidwall/chanx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple interface wrapper around a Go channel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages