suspendchan

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 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 struct {
	// contains filtered or unexported fields
}

Chan is a wrapper around a channel. Underlying chan must be accessed with ReceiveC method. If the Chan is suspended, ReceiveC will return nil which makes the receiver to block on the Chan.

func New

func New(buflen int) *Chan

New returns a new Chan.

func (*Chan) ReceiveC

func (c *Chan) ReceiveC() chan interface{}

ReceiveC returns the underlying channel for receiving values. If the channel is suspended, it returns nil.

func (*Chan) Resume

func (c *Chan) Resume()

Resume the channel. Reverts previous suspend operation.

func (*Chan) SendC

func (c *Chan) SendC() chan interface{}

SendC returns the underlying channel for sending values.

func (*Chan) Suspend

func (c *Chan) Suspend()

Suspend the channel.

Jump to

Keyboard shortcuts

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