From 2d40f3041b4d9472e10ec44158778dd4c6f1f784 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 17 Oct 2024 11:16:43 +0800 Subject: [PATCH] chore: update the READMEs --- README.md | 5 +++-- README_ZH.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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` 是如何运行的