Commit Graph

674 Commits

Author SHA1 Message Date
Kevin Bai f0e23928f4 add loop queue (#53)
* add loop queue

* add loop queue

* fix the bugs

add loop queue

move the worker queue to directory

按照新的接口实现 lifo 队列

添加新接口的环形队列实现

rename the slice queue

修复了 unlock

使用 queue 管理 goWorkerWithFunc

使用 dequeue 判断队列

add remainder

增加测试文件

循环队列需要一个空闲位

* remove interface{}

* Refine the logic of sync.Pool

* Add flowcharts of ants into READMEs

* Add the installation about ants v2

* Renew the functional options in READMEs

* Renew English and Chinese flowcharts

* rename package name

移动 worker queue 位置

worker queue 都修改为私有接口

考虑到性能问题,把 interface{} 改回到  *goworker

* 修改 releaseExpiry 和 releaseAll

* remove files

* fix some bug
2019-10-10 00:59:19 +08:00
Andy Pan 0efbda3f68 Update READMEs 2019-10-09 19:42:32 +08:00
Andy Pan 66350c88db Renew English and Chinese flowcharts 2019-10-08 20:49:47 +08:00
Andy Pan 617c89699a Renew the functional options in READMEs 2019-10-07 20:53:23 +08:00
Andy Pan 5f1a32384f Add the installation about ants v2 2019-10-07 19:50:09 +08:00
Andy Pan 49150bfa5e Add flowcharts of ants into READMEs 2019-10-07 19:31:03 +08:00
Andy Pan b1cf2ff445 Refine the logic of sync.Pool 2019-10-06 02:02:40 +08:00
Andy Pan 0a946593e2 Fix a issue in testing nonblocking pool 2019-10-04 11:36:11 +08:00
Andy Pan b0ec5102cc Refactoring 2019-10-04 11:24:13 +08:00
Andy Pan 2b9f35b18f Update README with awesome 2019-09-30 14:47:27 +08:00
Andy Pan e73db1d7d2 Replace mutex with spin-lock 2019-09-27 20:51:46 +08:00
Andy Pan 09973e8b1b Update READMEs 2019-09-24 13:35:42 +08:00
Cholerae Hu d6cd5a7e72 worker: decRunning when revertWorker is false
Signed-off-by: Cholerae Hu <choleraehyq@gmail.com>
2019-09-12 09:00:31 +08:00
Andy Pan 280ac345a8 Improve grammar in README and add go1.13 to CI 2019-09-05 20:31:52 +08:00
Andy Pan 89644d035c Remove some useless code 2019-09-03 09:29:26 +08:00
Andy Pan 9d68c36305 Move pull request template 2019-08-28 00:20:06 +08:00
Andy Pan 40defbb369
Create pull_request_template.md 2019-08-28 00:02:51 +08:00
Andy Pan 3782014b3c Update issue templates 2019-08-27 23:16:39 +08:00
Andy Pan a462acf87d
Create CONTRIBUTING.md 2019-08-27 23:10:55 +08:00
Andy Pan d5eded45bf
Merge pull request #48 from panjf2000/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2019-08-27 22:46:22 +08:00
Andy Pan bba6c12b60
Create CODE_OF_CONDUCT.md 2019-08-27 22:43:43 +08:00
Andy Pan 44aec9954f A little bit of optimization in periodicallyPurge() 2019-08-25 17:41:49 +08:00
Andy Pan cbf8ddf048 Fixed #45 and Releasing v2 module 2019-08-25 14:26:14 +08:00
Andy Pan 2c15b60572 Renew the "Performance Summary" chart 2019-08-25 14:14:18 +08:00
Andy Pan 201ac20358 Add functional options pattern for ants 2019-08-25 14:14:18 +08:00
Andy Pan 1c767b45a1 🦖Fit in the new `Pool.Release()` method 2019-08-25 14:14:18 +08:00
Andy Pan d1b4e8b163 🍻Refine the `Pool.Release()` Method 2019-08-25 14:14:18 +08:00
Cholerae Hu 444711e79f support nonblocking submit and max blocking limit setting
Signed-off-by: Cholerae Hu <choleraehyq@gmail.com>
2019-08-25 14:14:18 +08:00
Andy Pan 2cbd2e3c2f 🥇Add a new badge of Sourcegraph 2019-08-25 14:14:14 +08:00
Andy Pan b4dce88db7 🎏Fix some ill-formed code in unit tests 2019-08-25 14:13:57 +08:00
Andy Pan a129a1bbe4 🏅Add a new badge: golangci 2019-08-25 14:13:47 +08:00
Andy Pan e0998837f7 🎯Remove useless file from travis CI 2019-08-19 16:19:12 +08:00
Andy Pan 6851895376 📝Update example code 2019-08-19 16:16:42 +08:00
Andy Pan 08d01b6b48 🎏Fix a bug where invokers get stuck in waiting idle workers 2019-08-18 04:15:21 +08:00
Andy Pan af70ed0660 🎏Fix a bug where invokers get stuck in waiting idle workers 2019-08-18 02:45:32 +08:00
Andy Pan 4f88d413b4 🎖 Renew badges 2019-08-18 01:21:53 +08:00
Andy Pan a1888b140c 🧸Remove useless test cases 2019-07-27 13:10:11 +08:00
Andy Pan 61660e2109 📚Refactor the blocking logic in retrieveWorker function 2019-07-27 13:08:09 +08:00
Andy Pan 9cfc9fa643 🎲Add more test cases for new code 2019-07-27 12:05:55 +08:00
Andy Pan 51c0008356 🐞Fix a bug that blocks getting worker from pool 2019-07-27 12:05:44 +08:00
Andy Pan 61c6b5a7b0 🍜slightly revise 2019-07-27 12:02:21 +08:00
Andy Pan 94763266ad 🔋Fix some minor mistakes in test cases 2019-07-27 11:14:01 +08:00
Andy Pan 26cbd886a9 🎏Add go.mod 2019-07-27 11:12:16 +08:00
Andy Pan 254bb8b248 🍊Remove useless character in Chinese README 2019-07-27 02:31:25 +08:00
Andy Pan 01fb8f0d3e 🍓Delete a blank line in README 2019-07-27 02:27:46 +08:00
Andy Pan d931ac0d55 🍓Add a section for new feature: pre-malloc 2019-07-27 02:25:26 +08:00
Andy Pan 6b5c370832 🎨Update github badge 2019-07-27 01:39:10 +08:00
Andy Pan 71faec8c1a ☄️Rename the function with the more applicable name 2019-07-26 23:52:05 +08:00
anteoy 3e1c7a03a5 optimize memory allocation and add the log of panic stack 2019-07-26 23:22:24 +08:00
Andy Pan f447bf104a
📝Fix the type error 2019-07-26 16:11:26 +08:00