diff --git a/manualsort.go b/manualsort.go index c750a7a..5d40278 100644 --- a/manualsort.go +++ b/manualsort.go @@ -185,7 +185,11 @@ func main() { rand.Shuffle(len(items), func(i, j int) { items[i], items[j] = items[j], items[i] }) - sorted := mergeSort(items) + qchan := make(chan *Question, len(items)) + go betterLoop(qchan) + sorted := parallelMergeSort(qchan, items) + close(qchan) + fmt.Println("Sorted. Saving...") obuf := bufio.NewWriter(ofile) for i, s := range sorted {