Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidArgs = errors.New("invalid arguments")
)
Functions ¶
Types ¶
type Chanmap ¶
type Chanmap struct {
// contains filtered or unexported fields
}
Chanmap can create and index chans. Every chan created by chanmap has a unique id, so you can get them by the id.
Multiple goroutines can invoke methods on a Chanmap simultaneously.
func NewChanmap ¶
type DoneChan ¶
type DoneChan chan struct{}
You can notify something done through DoneChan.SetDone().
func NewDoneChan ¶
func NewDoneChan() DoneChan
type DoneChanR ¶
type DoneChanR <-chan struct{}
You can determine whether something done through DoneChanR.Done().
type Semaphore ¶
type Semaphore chan struct{}
Semaphore can be used to limit access to multiple resources.
func NewSemaphore ¶
Click to show internal directories.
Click to hide internal directories.