Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanson/cqueue
A queue design with golang chan
https://github.com/hanson/cqueue
Last synced: 24 days 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 (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-10T09:02:24.000Z (12 months ago)
- Last Synced: 2024-03-14T21:28:11.109Z (8 months 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/cqueuefunc 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
})
}
```