Commit Graph

12 Commits

Author SHA1 Message Date
Andy Pan 7be597c9e8 chore: code cleanup 2023-06-09 00:14:11 +08:00
Andy Pan 73defa0289 chore: rename the internal method in workerQueue 2023-04-04 13:01:14 +08:00
Andy Pan 55e222d20f chore: rename the method 'when' of worker to 'lastUsedTime' 2023-03-23 15:19:35 +08:00
Andy Pan e425c7b917 chore: rename the field 'recycleTime' of worker to 'lastUsed' 2023-03-23 15:18:56 +08:00
Andy Pan 0313effc53 opt: refactor the worker queue for reusability and readability of code 2023-03-23 12:28:47 +08:00
Andy Pan b604f7dc64 opt: fix the timeout error of ReleaseTimeout() with DisablePurge=true and improve tests 2022-10-11 22:52:13 +08:00
Andy Pan 9310acdff2 feat: implement pool.Waiting() API
Fixes #157
2022-05-07 22:43:25 +08:00
Bright Hsu 1bd4304727
Implement binary algorithm for speeding up the cleanup of expired workers in loop queue (#206) 2022-01-31 10:49:03 +08:00
Andy Pan ea787e5c0b Leverage tool testify to refine unit-test code 2020-01-08 11:07:12 +08:00
Andy Pan 7aaa4349f5 Optimize loop queue of workers 2019-10-20 18:38:11 +08:00
Andy Pan 566511ec5f Refactoring to the interface and implementations of worker-array 2019-10-10 03:02:04 +08:00
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