MCPcopy Index your code
hub / github.com/LyricTian/queue

github.com/LyricTian/queue @v1.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.0 ↗ · + Follow
52 symbols 183 edges 8 files 24 documented · 46%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

queue

A task queue for mitigating server pressure in high concurrency situations and improving task processing.

Build Codecov ReportCard GoDoc License

Get

go get -u -v github.com/LyricTian/queue

Usage

package main

import (
    "fmt"

    "github.com/LyricTian/queue"
)

func main() {
    q := queue.NewQueue(10, 100)
    q.Run()

    defer q.Terminate()

    job := queue.NewJob("hello", func(v interface{}) {
        fmt.Printf("%s,world \n", v)
    })
    q.Push(job)

    // output: hello,world
}

MIT License

    Copyright (c) 2017 Lyric

Extension points exported contracts — how you extend this code

Jober (Interface)
Jober an asynchronous task that can be executed [3 implementers]
job.go
Queuer (Interface)
Queuer a task queue for mitigating server pressure in high concurrency situations and improving task processing [2 implementers]
queue.go
SyncJober (Interface)
SyncJober a synchronization task that can be executed [1 implementers]
job.go

Core symbols most depended-on inside this repo

Error
called by 14
job.go
Wait
called by 6
job.go
NewJob
called by 6
job.go
Push
called by 5
list_queue.go
NewQueue
called by 5
chan_queue.go
Job
called by 4
job.go
NewListQueue
called by 4
list_queue.go
Run
called by 4
chan_queue.go

Shape

Method 23
Function 20
Struct 6
Interface 3

Languages

Go100%

Modules by API surface

job.go13 symbols
queue.go8 symbols
list_queue.go7 symbols
chan_queue.go7 symbols
worker.go5 symbols
list_queue_test.go5 symbols
chan_queue_test.go4 symbols
job_test.go3 symbols

For agents

$ claude mcp add queue \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact