getMessages gets a slice of messages to process
()
| 44 | |
| 45 | // getMessages gets a slice of messages to process |
| 46 | func getMessages() []string { |
| 47 | // file, _ := os.ReadFile("datums/melville-moby_dick.txt") |
| 48 | words := strings.Split("We dont want to overload io threads and the runtime while we are benchmarking, so we are addings some others words that are not as much but talk about go and other cool software things", " ") |
| 49 | return words |
| 50 | } |
| 51 | |
| 52 | // this will block and not close if the len(msgs) is larger than the channel buffer. |
| 53 | func (wp *workerPool) queueMessages() { |