refactoring: rename slice_parallel to slice_concurrent

This commit is contained in:
dudaodong committed 2024-08-14 10:52:36 +08:00
1 parent 5c53cb5867
commit 7f78a6b11e
5 files changed
+21 -18

No files matched your search

+2 -2
View File
@@ -1186,12 +1186,12 @@ func ExampleLeftPadding() {
// [0 0 0 1 2 3 4 5]
}
func ExampleUniqueByParallel() {
func ExampleUniqueByConcurrent() {
nums := []int{1, 2, 3, 1, 2, 4, 5, 6, 4, 7}
numOfThreads := 4
comparator := func(item int, other int) bool { return item == other }
result := UniqueByParallel(nums, numOfThreads, comparator)
result := UniqueByConcurrent(nums, numOfThreads, comparator)
fmt.Println(result)