Socket
Socket
Sign inDemoInstall

github.com/LyricTian/queue

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/LyricTian/queue


Version published

Readme

Source

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

FAQs

Last updated on 12 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc