Browse Source

Fix example test case to call Run() for majority case

Matt Bolt 4 years ago
parent
commit
6ff0f5fb95
1 changed files with 2 additions and 1 deletions
  1. 2 1
      pkg/util/worker/example_worker_test.go

+ 2 - 1
pkg/util/worker/example_worker_test.go

@@ -47,7 +47,8 @@ func Example_concurrentWorkers() {
 				fmt.Printf("Receive Result: %.2f for Input: %d\n", result, input)
 			}(i, receive)
 		} else {
-
+			// pass nil if receiving the result isn't necessary
+			workerPool.Run(i, nil)
 		}
 	}