Andy Pan
b604f7dc64
opt: fix the timeout error of ReleaseTimeout() with DisablePurge=true and improve tests
2022-10-11 22:52:13 +08:00
zhenshan.cao
8b106abaf3
Add option to turn off automatically purge ( #253 )
...
Fixes #252
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2022-10-11 21:16:04 +08:00
Andy Pan
96d074234a
Add a new method -- ReleaseTimeout() for waiting all workers to exit
...
Fixes #212
2022-03-08 16:28:12 +08:00
codingfanlt
fbd17036db
Awake the blocking callers when Tune(size int) is invoked to expand the pool ( #210 )
...
Fixes #205
2022-02-14 21:51:40 +08:00
Andy Pan
0fa2fd6dc1
Resolve lint issues
2022-02-08 13:55:42 +08:00
Andy Pan
8d03fcf77f
Fix the bug that blocks forever when call Release() before all tasks are done
...
Fixes #202
2022-02-08 13:53:21 +08:00
jdamick
63489606ef
Fix the timing issue in the TestNonblockingSubmitWithFunc ( #172 )
...
On some machines this unit would fail due to a timing issue. Since the Invoke in the loop was using nil as the param, it would (depending on timing) lead to the workers finishing the (w *goWorkerWithFunc) run() in the range loop over w.args as args would == nil and return.
If an explicit time.Sleep(1 * time.Second) is added before the " assert.EqualError(t, p.Invoke(nil), ErrPoolOverload.Error()," it is easily reproducible.
Co-authored-by: Jeffrey Damick <jdamick@amazon.com>
2021-07-12 22:52:47 +08:00
Andy Pan
a2ad870d2d
Returns -1 from Free() by unlimited pool
...
Fixes #152
2021-04-27 08:18:51 +08:00
Andy Pan
678f39767e
Upgrade golangci-lint and format some code
2020-07-05 00:04:47 +08:00
Andy Pan
ad86bfa6d2
Improve the unlimited pool
...
Updates #90
2020-05-27 22:26:39 +08:00
Andy Pan
1c534853c8
Support unlimited pool
...
Fixes #90
2020-05-08 23:24:26 +08:00
Andy Pan
d55cc24a22
Fix code issues
2020-04-08 13:16:14 +08:00
Andy Pan
e507ae340f
Support customized logger
2020-03-13 00:02:19 +08:00
Andy Pan
d32d668565
Add a feature of rebooting a released pool
2020-01-16 23:45:15 +08:00
Andy Pan
ea787e5c0b
Leverage tool testify to refine unit-test code
2020-01-08 11:07:12 +08:00
Andy Pan
5ecbdf4bf2
Make optimization to Pool and PoolWithFunc struct
2019-10-10 22:28:21 +08:00
Andy Pan
566511ec5f
Refactoring to the interface and implementations of worker-array
2019-10-10 03:02:04 +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
cbf8ddf048
Fixed #45 and Releasing v2 module
2019-08-25 14:26:14 +08:00
Andy Pan
201ac20358
Add functional options pattern for ants
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
b4dce88db7
🎏 Fix some ill-formed code in unit tests
2019-08-25 14:13:57 +08:00
Andy Pan
a1888b140c
🧸 Remove useless test cases
2019-07-27 13:10:11 +08:00
Andy Pan
9cfc9fa643
🎲 Add more test cases for new code
2019-07-27 12:05:55 +08:00
Andy Pan
94763266ad
🔋 Fix some minor mistakes in test cases
2019-07-27 11:14:01 +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
00294fd50b
😏 Optimization of the structure and style
2019-04-14 11:08:06 +08:00
Andy Pan
cd84ab67b3
🍜 Restore comments
2019-04-14 11:08:06 +08:00
Andy Pan
05fbdb8d5b
🎭 Fix race error
2019-04-14 11:08:06 +08:00
Andy Pan
aa7dd6f8cc
🦖 Develop a more graceful release
2019-04-14 11:08:06 +08:00
Andy Pan
4ae3fb8dc4
🏆 Code coverage improvement
2019-02-23 00:46:49 +08:00
Andy Pan
8bb0cde224
🌏 Reduce the threshold time of cleaning up goroutines in test code
2019-02-23 00:29:27 +08:00
Andy Pan
b8d6f7f9d6
☃️ Update go test for new function name
2019-02-19 20:10:01 +08:00
Andy Pan
c80af4dd6e
🐻 gofmt code
2019-01-29 20:51:34 +08:00
Andy Pan
e988680ffc
🎷 Reset the unit tests to default core number
2019-01-27 13:32:40 +08:00
Andy Pan
72bf8e2fb5
🎠 Do the code coverage test with multiple-cores and skip it when it is single-core
2019-01-27 12:57:53 +08:00
Andy Pan
c4d92bf4ef
🍁 Replace the data type of periodical duration with a constant
2019-01-27 12:16:51 +08:00
Andy Pan
182c335275
🍩 Unit tests improvement: more functions to cover more code
2019-01-27 05:31:29 +08:00
Andy Pan
822158c59c
🐳 Add test cases for sync.Pool
2019-01-27 05:10:13 +08:00
Andy Pan
840634ae51
🐳 Add test cases for sync.Pool
2019-01-27 05:10:13 +08:00
Andy Pan
689d74c63b
Refactor about the synchronous lock
2019-01-27 04:05:58 +08:00
Andy Pan
049de4139f
🐾 Refactor unit tests to support sync.Pool testing
2019-01-27 03:15:19 +08:00
Andy Pan
deff3a2beb
🦖 Add more unit tests for the near-perfect code coverage
2019-01-27 02:32:37 +08:00
Andy Pan
29f47ced64
🌊 Updated to fit the refactor
2019-01-27 00:06:32 +08:00
Andy Pan
a0364a1128
🐜 Reduce blank lines
2019-01-25 21:55:25 +08:00
Andy Pan
b9fb286d00
gofmt source code
2019-01-22 22:38:50 +08:00
Cholerae Hu
9158bd3702
feature: add PanicHandler
...
Signed-off-by: Cholerae Hu <choleraehyq@gmail.com>
2019-01-22 13:41:33 +08:00
Andy Pan
2093372461
update example codes of integrating with http server
2018-12-03 14:32:39 +08:00