Table of Contents
Async is a lightwight, easy-to-use, high performance, more human-being Asynchronous Framework
- 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 datas.
- 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 ....
go get github.com/Xunzhuo/async
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
async.Q().
SetMaxWaitQueueLength(100).
SetMaxWorkQueueLength(100).
Start().AddJobAndRun(async.NewJob(longTimeJob))
See the open issues for a full list of proposed features (and known issues).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE
for more information.
Project Link: https://github.com/Xunzhuo/async