فهرست منبع

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

Matt Bolt 4 سال پیش
والد
کامیت
19b405d284
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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)
 				fmt.Printf("Receive Result: %.2f for Input: %d\n", result, input)
 			}(i, receive)
 			}(i, receive)
 		} else {
 		} else {
-
+			// pass nil if receiving the result isn't necessary
+			workerPool.Run(i, nil)
 		}
 		}
 	}
 	}