From 171e50ebe44351fb53a18ca0e7df65a800994690 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 17 Dec 2023 17:51:09 +0000 Subject: [PATCH] split runners a little more --- day-16/two.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/day-16/two.go b/day-16/two.go index 73d7212..a321b6f 100644 --- a/day-16/two.go +++ b/day-16/two.go @@ -36,6 +36,12 @@ func two(lines []string) int { if n > res { res = n } + }(i) + + wg.Add(1) + go func(x int) { + defer wg.Done() + n = spawn(x, len(lines[0])-1, N, lines) if n > res { res = n @@ -52,6 +58,12 @@ func two(lines []string) int { if n > res { res = n } + }(i) + + wg.Add(1) + go func(y int) { + defer wg.Done() + n = spawn(len(lines[0])-1, y, W, lines) if n > res { res = n