Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
})
}
```