Golang-design/chann: A Unified Channel Package For ... - GitHub
Có thể bạn quan tâm
- Notifications You must be signed in to change notification settings
- Fork 6
- Star 43
- Code
- Issues 1
- Pull requests 1
- Actions
- Projects
- Security 0
- Insights
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Latest commitHistory14 Commits | ||||
| .github/workflows | .github/workflows | |||
| .gitignore | .gitignore | |||
| LICENSE | LICENSE | |||
| README.md | README.md | |||
| chann.go | chann.go | |||
| chann_test.go | chann_test.go | |||
| example_test.go | example_test.go | |||
| export_test.go | export_test.go | |||
| go.mod | go.mod | |||
| lb.go | lb.go | |||
| lb_test.go | lb_test.go | |||
| utils.go | utils.go | |||
| utils_test.go | utils_test.go | |||
| View all files | ||||
Repository files navigation
- README
- MIT license
a unified channel package in Go
import "golang.design/x/chann"This package requires Go 1.18.
Basic Usage
Different types of channels:
ch := chann.New[int]() // unbounded, capacity unlimited ch := chann.New[func()](chann.Cap(0)) // unbufferd, capacity 0 ch := chann.New[string](chann.Cap(100)) // buffered, capacity 100Send and receive operations:
ch.In() <- 42 println(<-ch.Out()) // 42Close operation:
ch.Close()Channel properties:
ch.Len() // the length of the channel ch.Cap() // the capacity of the channelSee https://golang.design/research/ultimate-channel for more details of the motivation of this abstraction.
License
MIT | © 2021 The golang.design Initiative Authors, written by Changkun Ou.
About
a unified channel package for buffered, unbuffered, and unbounded channels
golang.design/x/channTopics
golang channels generics unbounded-channelResources
ReadmeLicense
MIT licenseUh oh!
There was an error while loading. Please reload this page.
Activity Custom propertiesStars
43 starsWatchers
2 watchingForks
6 forks Report repositoryReleases
3 tagsUh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
- Go 100.0%
Từ khóa » Ch Ann
-
CNA: Breaking News, Singapore News, World And Asia
-
Ch Ann | Facebook
-
Chann - YouTube
-
Chann Chinese Last Name Facts - My China Roots
-
Ch'ng Kar Ann
-
Ryan Chann (@rchann) • Instagram Photos And Videos
-
BANGKOK-NOI (@channbangkoknoi) • Instagram Photos And Videos
-
CHANN Bangkok-Noi - Booking Deals + 2022 Promos - Agoda
-
CHANN - The Lowest Prices At KING POWER Duty Free
-
Sophat Chann - Crunchbase Person Profile
-
CHANN Bangkok Noi Reviews - Thailand - Tripadvisor
-
Chann Wellness Spa | Phuket Luxury Resort Spa Retreat
-
Ann Griffin