You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ ok github.com/devchat-ai/gopool 3.946s
81
81
<imgsrc="./logo/gopool.png"width="750">
82
82
</div>
83
83
84
-
-[x]**Task Queue**: GoPool uses a thread-safe task queue to store tasks waiting to be processed. Multiple workers can simultaneously fetch tasks from this queue.
84
+
-[x]**Task Queue**: GoPool uses a thread-safe task queue to store tasks waiting to be processed. Multiple workers can simultaneously fetch tasks from this queue. The size of the task queue can be configured.
85
85
86
86
-[x]**Concurrency Control**: GoPool can control the number of concurrent tasks to prevent system overload.
87
87
@@ -163,6 +163,35 @@ func main() {
163
163
}
164
164
```
165
165
166
+
## Configurable Task Queue Size
167
+
168
+
GoPool uses a thread-safe task queue to store tasks waiting to be processed. Multiple workers can simultaneously fetch tasks from this queue. The size of the task queue can be configured when creating the pool using the `WithTaskQueueSize` option.
169
+
170
+
Here is an example of how to use GoPool with a configurable task queue size:
GoPool supports dynamic worker adjustment. This means that the number of workers in the pool can increase or decrease based on the number of tasks in the queue. This feature can be enabled by setting the MinWorkers option when creating the pool.
0 commit comments