IsUnsafe

package
v0.0.0-...-5012a73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chan

type Chan interface {
	ROnlyChan // aka "<-chan" - receive only
	SOnlyChan // aka "chan<-" - send only
}

Chan represents a bidirectional channel

type DCh

type DCh struct {
	// contains filtered or unexported fields
}

DCh is a demand channel

func MakeDemandBuff

func MakeDemandBuff(cap int) *DCh

MakeDemandBuff returns a (pointer to a) fresh buffered (with capacity cap) demand channel

func MakeDemandChan

func MakeDemandChan() *DCh

MakeDemandChan returns a (pointer to a) fresh unbuffered demand channel

func (*DCh) Provide

func (c *DCh) Provide(dat uintptr)

Provide is the send function - aka "MyKind <- some "

func (*DCh) Request

func (c *DCh) Request() (dat uintptr)

Request is the receive function - aka "some <- MyKind"

func (*DCh) Try

func (c *DCh) Try() (dat uintptr, open bool)

Try is the comma-ok multi-valued form of Request and reports whether a received value was sent before the channel was closed.

type ROnlyChan

type ROnlyChan interface {
	Request() (dat uintptr)        // the receive function - aka "My := <-MyROnlyChan"
	Try() (dat uintptr, open bool) // the multi-valued comma-ok receive function - aka "My, ok := <-MyROnlyChan"
}

ROnlyChan represents a receive-only channel

type SOnlyChan

type SOnlyChan interface {
	Provide(dat uintptr) // the send function - aka "MyKind <- some "
}

SOnlyChan represents a send-only channel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL