https://github.com/hanson/cqueue
A queue design with golang chan
https://github.com/hanson/cqueue
Last synced: about 1 year ago
JSON representation
A queue design with golang chan
- Host: GitHub
- URL: https://github.com/hanson/cqueue
- Owner: Hanson
- License: mit
- Created: 2023-11-10T08:59:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T09:02:24.000Z (over 2 years ago)
- Last Synced: 2025-01-31T06:46:49.123Z (over 1 year ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cqueue
A queue design with golang chan.
## Install
```go get github.com/hanson/cqueue```
## Usage
```go
import github.com/hanson/cqueue
func main() {
cqueue.Run()
cqueue.AddQueue("task_a", 10, true)
cqueue.AddQueue("task_b", 10, false)
var conn *conn
cqueue.AddQueue(cqueue.GenQueueKey(conn), 10, false)
AddTask("task_a", func() {
// do something
})
}
```