Ver Fonte

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

Matt Bolt há 4 anos atrás
pai
commit
19b405d284
1 ficheiros alterados com 2 adições e 1 exclusões
  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)
 		}
 	}