Skip to content

Commit c37246f

Browse files
committed
docs: replace new engine with new pool
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 14e749b commit c37246f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,10 @@ func main() {
209209
)
210210

211211
// define the queue
212-
q, err := queue.NewQueue(
213-
queue.WithWorkerCount(10),
212+
q := queue.NewPool(
213+
5,
214214
queue.WithWorker(w),
215215
)
216-
if err != nil {
217-
log.Fatal(err)
218-
}
219-
220-
// start the five worker
221-
q.Start()
222216

223217
// assign tasks in queue
224218
for i := 0; i < taskN; i++ {

0 commit comments

Comments
 (0)