fix: callback update.

This commit is contained in:
Gordon 2024-04-19 12:22:14 +08:00
parent e82fd5a95e
commit b35c9e4382

View File

@ -2,7 +2,6 @@ package memAsyncQueue
import (
"errors"
"fmt"
"sync"
"time"
)
@ -39,7 +38,6 @@ func (mq *MemoryQueue) Initialize(workerCount int, bufferSize int) {
go func(workerID int) {
defer mq.wg.Done()
for task := range mq.taskChan {
fmt.Printf("Worker %d: Executing task\n", workerID)
task() // Execute the function
}
}(i)