diff --git a/README.md b/README.md index b3615fa..eb49112 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,11 @@ Library `ants` implements a goroutine pool with fixed capacity, managing and rec - Managing and recycling a massive number of goroutines automatically - Purging overdue goroutines periodically -- Abundant APIs: submitting tasks, getting the number of running goroutines, tuning the capacity of the pool dynamically, releasing the pool, rebooting the pool +- Abundant APIs: submitting tasks, getting the number of running goroutines, tuning the capacity of the pool dynamically, releasing the pool, rebooting the pool, etc. - Handle panic gracefully to prevent programs from crash -- Efficient in memory usage and it even achieves [higher performance](#-performance-summary) than unlimited goroutines in Golang +- Efficient in memory usage and it may even achieve ***higher performance*** than unlimited goroutines in Golang - Nonblocking mechanism +- Preallocated memory (ring buffer, optional) ## 💡 How `ants` works diff --git a/README_ZH.md b/README_ZH.md index 5bd17bd..015f60d 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -22,10 +22,11 @@ - 自动调度海量的 goroutines,复用 goroutines - 定期清理过期的 goroutines,进一步节省资源 -- 提供了大量有用的接口:任务提交、获取运行中的 goroutine 数量、动态调整 Pool 大小、释放 Pool、重启 Pool +- 提供了大量实用的接口:任务提交、获取运行中的 goroutine 数量、动态调整 Pool 大小、释放 Pool、重启 Pool 等 - 优雅处理 panic,防止程序崩溃 -- 资源复用,极大节省内存使用量;在大规模批量并发任务场景下比原生 goroutine 并发具有[更高的性能](#-性能小结) +- 资源复用,极大节省内存使用量;在大规模批量并发任务场景下甚至可能比原生 goroutine 并发具有***更高的性能*** - 非阻塞机制 +- 预分配内存 (环形队列,可选) ## 💡 `ants` 是如何运行的