Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Xunzhuo/async

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Xunzhuo/async

  • v0.1.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Contributors Forks Stargazers Issues


Logo

Async

Async is a lightwight, easy-to-use, high performance, more human-being Asynchronous async.DefaultAsyncQueue()

GoDoc Build Status CodeQL Go Report Card Coverage Status

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About this Project

Async is a lightwight, easy-to-use, high performance, more human-being Asynchronous async.DefaultAsyncQueue()

Spotlights

  • Async is very easy to use, creating the jobs just by a couple of lines.
  • Support master/slave job mode or standalone job mode
  • Provide powerful options to control the jobs like the MaxNumber of WorkQueue.
  • Provide inner cache to speed up to get the cached jobs data.
  • Help you easily manage your jobs into asynchronous way like:
    • reducing the time like the long time of http response in large number of requests
    • reducing the time like when interating with DataBase to query SQL
    • reducing ....

Getting Started

Code

Installation

  go get github.com/Xunzhuo/async
Built with

Concepts

Async supports two Running Mode:

  • The Standalone Job mode In this mode, each job has an unique JobID, you can create one job for one JobID
  • The Master/Slave Job mode In this mode, the job ID can be called as master job ID, the master job ID is unique as well one master job ID can contains a few slave jobs with subID, you can create one master job with many slave jobs

Async takes JobID as the key to create/find/update/delete Job

JobID in Async has two kinds:

  • jobID:
    • the unique job id in standalone job mode
    • the master job id in master/slave job mode
  • subID: the slave id in master/slave job mode

Quick Start

	async.Q().
		SetMaxWaitQueueLength(100).
		SetMaxWorkQueueLength(100).
		Start().AddJobAndRun(async.NewJob(longTimeJob))

Demo

Roadmap

See the open issues for a full list of proposed features (and known issues).

Contributors

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Contact

Project Link: https://github.com/Xunzhuo/async

Acknowledgments

FAQs

Package last updated on 27 Mar 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc