From 03f3bf552bc3101bcb443f65ddf0b4f434a233e5 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 23 Oct 2015 19:34:43 +0200 Subject: Remove debugging statements --- gwic.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gwic.go b/gwic.go index 2a28f43..a01ac45 100644 --- a/gwic.go +++ b/gwic.go @@ -52,12 +52,10 @@ func feedworkers(wlist []*work, w string) []*work { ret = make([]*work, len(wlist)) copy(ret, wlist) - //fmt.Fprintf(os.Stderr, "wlist not empty: %v ret: %v\n", wlist, ret) for _, wc := range wlist { if wc.left == 0 { wc.finish() - //fmt.Fprintf(os.Stderr, "Closed wc: %s\n", wc) // TODO: remove the right one? if len(wlist) >= 1 { ret = wlist[1:] @@ -65,7 +63,6 @@ func feedworkers(wlist []*work, w string) []*work { } else { wc.c <- w wc.left -= 1 - //fmt.Fprintf(os.Stderr, "diminished wc: %v\n", wc) } } @@ -85,19 +82,15 @@ func printqueue(q *queue, words chan string, left int, out chan string) { q.insert(fmt.Sprintf("%q", w)) - //fmt.Fprintf(os.Stdout, "%q totally matched %q\n", w, kw) - //fmt.Fprintf(os.Stdout, "queue was %v\n", q.q) - wc := &work{c: make(chan string, 10), left: 5, done: make(chan struct{})} hungryhippos = feedworkers(hungryhippos, w) sl := make([]string, MAX) - //n := copy(sl, q.q[6:]) copy(sl, q.q[6:]) - //fmt.Fprintf(os.Stdout, "copied %d : %v\n", n, sl) + hungryhippos = append(hungryhippos, wc) - //fmt.Fprintf(os.Stderr, "appended hungryhippos: %v %d\n", hungryhippos, len(hungryhippos)) + go wc.print_kwic(sl, out) } for _, wc := range hungryhippos { -- cgit v1.2.3